Unable to create Personal Access Token: "Max number of tokens is: 0, can not create new token"
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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.
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:
1
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,
1
-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.
Was this helpful?