Loading
Feature Disruption - Service Cloud VoiceRead More
Feature degradation | Gmail Email delivery failureRead More

MFA and Build on Maven not working

Publish Date: Mar 21, 2025
Resolution

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 Article Number

001122800

 
Loading
Salesforce Help | Article