Loading

MFA and Build on Maven not working

Publiseringsdato: Mar 21, 2025
Løsning

SYMPTOM

After enabling MFA to the user the deployment using Maven of an API returns 401 Unauthorized error

CAUSE

Maven tries to connect to Anypoint but it is not able to validate the MFA, because of that the error is appearing.

SOLUTION

Recommended: Authentication for Maven deployment can be set using a Connected Application. Refer to the following documentation: How to use Connected Apps with client_credentials in CI/CD using a Federated Anypoint Organization on its own behalf, not on behalf of users / How to deploy an application to CloudHub using Connected App functionality.
Not recommended: User can exclude a particular account from needing the two-factor authentication. Refer to the following documentation: Exempt Users from Multi-factor Authentication.

Knowledge-artikkelnummer

001122800

 
Laster
Salesforce Help | Article