ARTIFACTORY: How to resolve "Unsupported authentication method Basic" error when creating an access token

ARTIFACTORY: How to resolve "Unsupported authentication method Basic" error when creating an access token

Products
Frog_Artifactory
Content Type
REST_API
AuthorFullName__c
DaYoun Kang
articleNumber
000006692
FirstPublishedDate
2025-11-17T13:22:55Z
lastModifiedDate
2025-11-17
VersionNumber
1
When a user tries to create an access token using the Create Token REST API here (POST /access/api/v1/tokens), they can run into the below error:
Unsupported authentication method Basic

For this specific API, basic credentials are not allowed to be used if multi-factor authentication is enabled according to our documentation:
“If you use basic credentials, you must enable creation of tokens in the JFrog Platform UI. 
For more information, see Enable Token Generation via API. 
You cannot create a token through a REST API if you have enabled multi-factor authentication in the system and the basic-authentication-enforce-mfa flag in the access.config file is set to true.”

As a workaround, the user can pass the bearer token (Artifactory access token) into the command like below for example:
curl -H "Authorization: Bearer eyJ2Z...Hg"  -XPOST "https://ARTIFACTORY_URL/access/api/v1/tokens"  -d '{ "username": "user", "scope": "applied-permissions/admin", "description": "Token for system metrics read access" }'