Skip to content
AgentZforiMIS®

iMIS access tokens

This article explains how AgentZ gets the iMIS access tokens that let your AI app work in iMIS as you, how long they last and who receives them.

An iMIS access token is a short-lived pass your iMIS site issues to show that a request comes from a particular iMIS user. The AgentZ plugin uses one to call your iMIS site’s API as you, without holding your password.

Your iMIS site’s own token service issues every token. The AgentZ app asks for it through iFINITY’s AgentZ service, which adds your organisation’s Client Application secret and passes the answer back. The AgentZ app normally renews with a renewal token your iMIS site gave it earlier, and uses your saved username and password only when renewal is refused.

A token lasts as long as your iMIS site allows, about an hour; your iMIS site sets this in AgentZ’s Client Application. The AgentZ app renews the token about five minutes before it runs out, and never tries a renewal token after its lifetime has passed.

The AgentZ app never writes the access token to disk. It holds it in memory, and gives it only to the AgentZ plugin, over the private connection on your computer.

The renewal token is saved on your computer in the same encrypted storage as your iMIS sign-in, so the AgentZ app can carry on after a restart. If your iMIS site refuses it, the AgentZ app removes it.

The AgentZ app gives the access token only to an AgentZ plugin that has proved, over the private connection on your computer, that it holds the key the AgentZ app made for this session. Any other program is never given it. See The connection to your AI app.

The AgentZ plugin removes the token, and the other credentials it holds, from everything it reports back to the AgentZ app, so tokens do not appear in your activity.

  • iMIS – a system administrator can see the token lifetime iMIS uses for AgentZ in AgentZ’s Client Application, under Settings > Contacts > Client applications.

Which iMIS sign-in methods does AgentZ use to get a token? Two: a renewal token, normally, and the person’s iMIS username and password when renewal is refused. Both go to your iMIS site’s own token service.

What can a token do? Only what the person’s iMIS user is allowed to do. iMIS applies that user’s permissions to every request.

How long does a token stay valid? About an hour, as set by your iMIS site. AgentZ renews it shortly before it runs out.

Does the AgentZ app save tokens on the computer? It saves the renewal token, encrypted in the same storage as the iMIS sign-in, and removes it if your iMIS site refuses it. It never writes the access token to disk; it holds it in memory.

Could another program on the computer obtain the token from AgentZ? No. The AgentZ app gives it only to an AgentZ plugin that has proved itself.