Author: Ashish Shrivastava
- In Anypoint Studio, from the Menu bar, go to Windows 🡪 Preferences and type “Browser” in the search bar. Select the Browser Settings option and choose Native as a default browser. The built-in browser cannot exchange authentication token correctly with Identity Provider, so we need to choose Native Browser.

- If we don’t choose the Native and built-in browser options, the following error will be thrown.

Error while checking if your session is valid
Could not retrieve the persistent token
Server Payload:
{"error":"invalid_grant","error_description":"invalid code"}
- Next, search for Authentication, and when the user login window pops up, choose the Use Custom Domain option as shown below:

- In the new window, enter the custom domain name for your organization, you can get this information from your Profile Settings on the Anypoint Platform. Refer to the screenshots below:


- After entering an organization domain name, click continue, and a User Login window will pop up, choose to Continue with the Identity Provider option, refer to the below screenshot:

- If MFA(Multi-Factor Authentication) or 2FA (2-Factor Authentication) is enabled by Identity Provider, complete the verification steps for the same.

- Once authentication is done successfully with Identity Provider, the account will be added in Anypoint Studio. Then we can download dependencies, artifacts, and API Specifications from Anypoint Exchange and Design Center as per requirements.
