Overview
When creating a Mapbox SSO Integration in the Auth0 Dashboard under Applications > SSO Integrations > Mapbox, the following error occurs even though Auth0 shows a successful login in the logs.
Your login attempt appeared to be for a different service, please contact your IT admin to learn more
Applies To
- Mapbox SSO Integration
Cause
This is caused by the difference between the Audience passed from Auth0 and the Audience expected by Mapbox. In Mapbox, the Audience can be found under the “Audience Restriction” field, but with Auth0’s Mapbox SSO Integration, it is not possible to manually configure the Audience in the Auth0 Dashboard.
Solution
As the Audience can not be directly set through the Dashboard, it must be configured through the Management API. To configure the Audience, first get the body of the Mapbox SSO Integration, then patch it with the proper Audience value. Follow these steps to properly configure the Audience in your Mapbox SSO Integration:
- Open the Management API at the
GET /api/v2/clients/{id}
endpoint - Get client by ID - Select Set API Token and insert the token found in the Auth0 Dashboard under APIs > Management API > API Explorer and copy Token
- At path:
id
, insert theclient_id
of your Mapbox SSO Integration, and select Test Endpoint to retrieve the body of the client - Copy this body and head to the
PATCH /api/v2/clients/{id}
endpoint - Update a client - Insert the
client_id
once again at path:id
, and paste the body we copied at step 4 - Modify the “audience” with the value found at Mapbox’s Audience Restriction
- Finally, select Test Endpoint