Struggeling to Authenticate to Microsoft AD With Open ID Connect using Named Credentials/External Credentials.
First of all: This approach works on all Salesforce Instances, now I have this issue on a single Customer-Sandbox.
My Auth Provider:
Following things were done:
- Added Client Id / Secret from Connected App within Microsoft AD
- Added Callback URL to Connected App within Microsoft AD
My External Credentials
The User has Access through Permissionset for following two things:
- All Permisions for "User External Credential" Object
- Permission for the Principal in External Credential (External Credential Principal Access)
Execution
After this, the User is able to start the authentication flow through his User Settings:
This Flow successfully authenticated the User at Microsoft AD and finally redirects user to Callback URL. At this point i allways get following:
In the URL there is following ErrorCode:
AuthorizationError?ErrorCode=Existing_link&startURL=XXXX
Sadly this ErrorCode is not mentioned by Salesforce: https://help.salesforce.com/s/articleView?id=sf.remoteaccess_oauth_flow_errors.htm&language=en_US&type=5
This approach works perfectly on several Salesforce instances, only not on this specific one. What I've compared with working Salesforce Instances:
- Sessions Settings
- IP Restrictions
Does anybody experienced same? How to get the root cause for "Existing_Link"? I got somewhere at StackExchange, that this ErrorCode is raised if no Access to "User External Credential" is granted. But this Permission is granted.
Any suggestion?