DANGER: Also, it is recommended to have an Org Admin which isn’t on the IdP and can access the org in case you make a typo. Making a typo here will destroy your IdP configuration and therefore render the platform unable to authenticate users via IdP. Please keep the result of the steps in this documment until you find everything works fine. So that you will be able to look back what was done in case if you see any issues.1. Obtain an Access Token for performing API calls
POST /accounts/login HTTP/1.1
Host: www.anypoint.mulesoft.com
Content-Type: application/json
cache-control: no-cache
{
"username": "<YOUR USERNAME>",
"password": "<YOUR PASSWORD>"
}
GET /accounts/api/organizations/<YOUR_ORG_ID>/provider/users HTTP/1.1 Host: anypoint.mulesoft.com Authorization: Bearer cache-control: no-cache3. Update your IdP configuration. You need to modify the previously obtained configuration, until you have something similiar to the configuration below.
{
"allow_new_non_sso_users": true,
"saml": {
"issuer": ...,
"public_key": ...,
"audience": ...,
"claims_mapping": {
"firstname_attribute": "FirstName",
"lastname_attribute": "LastName",
"email_attribute": "Email",
"group_attribute": "Role"
},
"name": "SAML 2.0"
},
"service_provider": {
"urls": {
"sign_on": ...,
"sign_out": ...
},
"name": "SAML Service Provider"
},
"type": {
"description": "SAML 2.0",
"name": "saml"
}
}
4. We need to perform a few JSON modifications to that response. First of all wrap the entire thing in another JSON object and insert an identity_management field, it should now look like this -
{
"identity_management": {
"allow_new_non_sso_users": true,
"saml": {
"issuer": ...,
"public_key": ...,
"audience": ...,
"claims_mapping": {
"firstname_attribute": "FirstName",
"lastname_attribute": "LastName",
"email_attribute": "Email",
"group_attribute": "Role"
},
"name": "SAML 2.0"
},
"service_provider": {
"urls": {
"sign_on": ...,
"sign_out": ...
},
"name": "SAML Service Provider"
},
"type": {
"description": "SAML 2.0",
"name": "saml"
}
}
}
5. After this, we need to modify the public_key field to become an array from a string. The first element of that array needs to be the same value from the response - the current key used by the IdP you have configured. The second key is the one that was generated on Salesforce; you will need to take the value from the downloaded CRT file and insert this into the JSON, like this:
{
"identity_management": {
"allow_new_non_sso_users": true,
"saml": {
"issuer": ...,
"public_key": [
"CURRENT KEY",
"NEW KEY FROM CRT FILE"
],
"audience": ...,
"claims_mapping": {
"firstname_attribute": "FirstName",
"lastname_attribute": "LastName",
"email_attribute": "Email",
"group_attribute": "Role"
},
"name": "SAML 2.0"
},
"service_provider": {
"urls": {
"sign_on": ...,
"sign_out": ...
},
"name": "SAML Service Provider"
},
"type": {
"description": "SAML 2.0",
"name": "saml"
}
}
}
6. Now that you have your modified payload it is time to send it back.
PUT /accounts/api/organizations/<YOUR_ORG_ID>/provider/users HTTP/1.1 Host: anypoint.mulesoft.com Authorization: Bearer <YOUR TOKEN> Content-Type: application/json cache-control: no-cacheRemember to also send the JSON you modified with that PUT.
001117205

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.