Unable to create Personal Access Token: "Max number of tokens is: 0, can not create new token"
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
When trying to generate a new Personal Access Token (PAT) in Bamboo, the following error message is shown:
User X has 0 tokens. Max number of tokens is : 0, can not create new token
The number of tokens might vary and be different than 0.
Environment
All Bamboo supported versions.
Diagnosis
When trying to generate a new Personal Access Token, the following error is displayed (the vale can be different than 0) and the token generation fails:
User X has 0 tokens. Max number of tokens is : 0, can not create new token
Upon checking the Java/Catalina options section under Bamboo administration > System information, the following property can be seen: bamboo.access.token.user.max
.
Cause
By default, Bamboo allows up to 100 personal tokens per user. However, the bamboo.access.token.user.max property can be set to define a maximum value of tokens per user, or to disable the functionality if set to 0.
Solution
The solution consists to increase the maximum value, or remove the property from Bamboo. The steps for this are described in the following article:
- Configuring your system properties
The value can be increased/changed. For example,
-Dbamboo.access.token.user.max=300
- If the property is removed from the list of Bamboo system properties, the default maximum value will be 100 tokens.