Limit the Number of Personal Access Tokens a User Can Create

An organization administrator can limit the maximum number of tokens a user in the organization is allowed to create. This action can prevent users from creating excessive numbers of personal access tokens. It also makes it easier for an administrator to maintain existing tokens. The Organization Properties page provides an option for controlling the maximum number of tokens each user can create. The default limit is 10 personal access tokens per user, but this limit can be increased to a maximum of 50 tokens per user. The set value applies to all users, including the organization administrator, who sets the limit.

To set a new limit for the number of personal access tokens a user can create:
  1. In the left navigator, click Organization Organization.
  2. Click the Properties tab.
  3. In the Access Token Controls section, at the bottom of the page, select the Enforce a per-user limit on the number of personal access tokens check box.
  4. In the Number of tokens field, use the selector to set the maximum number of personal access tokens each user in the organization can have.
    The default value is 10. The maximum number is 50.

After the check box is selected and a limit set, the User Preferences, Maven Browse, and NPM Browse pages will use the set limit to deal with the situation that arises when a user's token limit has been reached. When the limit is decreased, the new limit applies to new token creation only. It doesn't force users to delete any of their existing tokens. In other words, it doesn't affect the number of already-created tokens but it can prevent them from creating any new tokens until they delete enough of the existing tokens to be under the limit.

To remove the limit, deselect the Enforce a per-user limit on the number of personal access tokens check box.

Note:

VB Studio automatically deletes tokens 30 days after they expire, but not without giving users plenty of advance notice first: