MuleSoft · Client ID Enforcement policy

401 Unauthorized or invalid client application credentials

Short answer

An API protected by the Client ID Enforcement policy returns 401 when the client application's credentials are missing, invalid or not authorized. The client needs an approved contract for the API and must send matching credentials on every request.

VerifiedLast verified

01Error text

MuleSoft error
401 - Unauthorized or invalid client application credentials

02Likely causes

  • The client application credentials are invalid or unauthorized.
  • An approved contract must exist between the client application and the API.
  • Every request must carry credentials that match the way the policy is configured.

03How to fix it

  1. Confirm the client application has an approved contract for this API instance.
  2. Check how the policy expects credentials. The WWW-Authenticate response header is Client-ID-Enforcement in custom mode and Basic realm="mule-realm" in Basic Auth mode.
  3. Send the client ID and secret in the place the policy configuration names, with the values from that client application.
  4. Repeat the request.

iNotes

The same policy returns 500 - Bad response from authorization server, or WSDL SOAP Fault error. SOAP APIs return a SOAP error.

04Official documentation

Test every fix in a non-production environment before you apply it to production. See how entries are verified.

More for MuleSoft work:Open MuleSoft jobsMuleSoft rates and salariesHire a senior MuleSoft developer

The iPaaS Brief

Subscribe to The iPaaS Brief.

The iPaaS newsletter for the people who run integrations. From iPaaS Group.

Free. You finish on theipaasbrief.com and confirm by email.