Limit how long delegated consent lasts
This guide sets how long an agent may act for a person after that person consents, on a credential provider and on a single stored consent.
From version 1.0.10, an Authorization Code credential provider can carry a Consent time limit. Each consent then ends that long after the person gave it, and the gateway asks the person to consent again the next time their agent needs access. See Consent time limits.
Without a limit, a consent lasts until someone revokes it, and the gateway refreshes the person’s token for as long as the vendor allows. An agent can then keep acting for a person long after they last approved it.
Use this guide when:
- Your organisation needs people to approve an agent’s access again after a set time.
- One person’s access should end sooner than the provider’s limit, for example when they change role.
- Access must end at once, for example when a person leaves or a credential may be compromised.
Prerequisites
- A credential provider of type OAuth 2.0, Authorization Code, bound to a surface through a Credential Delegation element. See Call third-party APIs as each caller.
- A role that can view and edit credential providers, and view and delete delegated access. By default, the Administrator role has these.
- To see the audit records in Confirm, a role that can view the audit, and verifiable presentation (VP) auditing that keeps Consent Granted and Token Revoked. Under Settings › Security, on the VP Audit card, select them under Events to keep. Selecting Consent Granted also keeps Consent Expired records, and selecting Token Revoked also keeps Consent Limited records.
Steps
Set a consent time limit on the provider
- In the sidebar, select Credentials, then the Credential Providers tab, and open your provider.
- In Consent time limit, enter a number and select minutes, hours or days, for example
8hours. The limit can be from 1 minute to 365 days. Leave it empty for no limit. - Read the warning under the field, if one appears. It appears when the change can end consents already given, such as a shorter limit. It counts only the active consents that saving ends now, such as those already older than the new limit, so consents younger than the limit are left out. In the image below, a limit of
1with minutes selected shows “Saving ends 2 active GitHub consents now. Those people approve again next time their agent needs GitHub.” - Select Save.
A longer limit, or an empty one, applies to new consents only. Consents already given keep the end they were given.

Limit one person’s consent
- In Credentials, select the Credential Tokens tab.
- On the person’s row, select Limit duration. Limit duration appears only on a consent that is still active.
- In the panel, enter how long after consent the agent may act for this person, for example
2hours. - Read the preview under the fields. It shows when the consent was given and when it ends with this limit. A limit only brings the end forward, so a value later than the current end, or one that has already passed, can’t be saved.
- Select Save limit.
The notice “Limit saved.” names the new end. The person’s next consent takes the provider’s limit again.

Revoke access that must end now
- In Credentials, select the Credential Tokens or Delegated Access tab.
- On the person’s row, select Revoke. The button then asks, for example, “Revoke GitHub access?”.
- Select it again to revoke.
To end every delegation a person has on Credential Tokens, select the button beside their user whose tooltip reads Revoke all for this user. It then asks, for example, “Revoke all 3 for this user?”. Select it again to revoke.
What the person sees
- The consent start page shows a Time limit line, for example “The agent may use it for 8 hours after you approve. Then it asks you again.”
- After the vendor sign-in, Authorization Successful says until when the agent has access.
- When the consent has ended, the agent’s next request gets a new consent link. In the Elicit consent mode, the prompt says “Your earlier access ended at its time limit.” and how long the new access lasts.
Confirm
Test 1: Credential Tokens shows when each consent ends
On the Credential Tokens tab, the Consented column of a consent given under a limit shows “Ends”, the date, and the time left. Expand the row to see Consent Ends. A consent that ends within a day shows Ending soon in Status.
Test 2: Delegated Access lists the active consent with its end
On the Delegated Access tab, the person’s Ends column shows the time left, the limit that applies, such as “8-hour limit”, and the end date. A consent with no limit shows “No time limit”. Ended and revoked access is left out of this tab.
Test 3: Audit page records the limit and the end
- In the sidebar, select Audit.
- In Category, select Consent Limited. The record of Step 2 says “An operator made the consent for GitHub end sooner.” and gives the new end.
- After the consent ends, select Consent Expired in Category. The record says the consent reached its time limit, so the stored credential was removed.
History on the Delegated Access tab opens the same page on the records of access that ended or was revoked.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Consent time limit isn’t on the provider page | The provider isn’t an Authorization Code provider. Only a provider that people consent to takes a limit. | Use an OAuth 2.0, Authorization Code provider for delegated access that needs a time limit. |
| The field shows “Enter a limit from 1 minute to 365 days, or leave it empty.” | The limit is outside the range, or isn’t a whole number. | Enter a whole number in a unit that keeps it from 1 minute to 365 days, or clear the field. |
| Limit duration isn’t on a row | The consent has ended, the provider isn’t an Authorization Code provider, or your role can’t delete delegated access. | Check the row’s Status. Ask an administrator for permission to delete delegated access. |
| Save limit stays disabled, with “A limit only brings the end forward.” | The consent already ends at or before the end that limit gives. | Enter a shorter limit. |
| The preview says “This consent is already older than that. Use Revoke to end it now.” | The limit would end the consent at once. | Select Revoke on the row instead. |
| A person is asked to consent again sooner than expected | A shorter provider limit also ended consents that were already older than it, or an operator used Limit duration. | Check the Audit page for a Consent Expired or Consent Limited record for the person. |
| Raising the limit didn’t extend a person’s access | A longer limit applies to new consents only. | Ask the person to consent again, or revoke their access so the next request asks for a new consent. |
Next steps
- Call third-party APIs as each caller: Set up the provider and binding this guide limits.
- Credentials: How consent ends, and what the Credential Tokens and Delegated Access tabs show.
Related
- Audit log: The Consent Granted, Consent Expired and Consent Limited records.
- Settings: The roles and permissions that the credential provider and delegated access pages need.
- Caller context binding: How the gateway keys each person’s stored tokens.
Glad to hear it. Thanks for letting us know.
Sorry to hear that. Thanks for letting us know.
Still stuck? Ask the community on Discord or contact us.