Hello Everyone,
My organization is using SSO for our Salesforce instance, so I am unable to use the OOTB Salesforce Connector. Instead, I have created a Custom Connector that uses an OAuth 2.0 flow with a Connected App i've set up within Salesforce. When I test the connection, the initial connection succeeds with no issues, and I can also verify this in the Salesforce user logs. However, when I try to test an Operation, I am getting:
[{
"message": "Session expired or invalid",
"errorCode": "INVALID_SESSION_ID"
}]
It is difficult for me to tell where the breakdown is occurring, as the Operation request is calling the azure-apihub.us with an access token that does not correspond to the Salesforce access token. I've followed the Microsoft troubleshooting steps here to confirm that my OAuth 2.0 settings are configured correctly: https://support.microsoft.com/en-us/topic/verifying-oauth-configuration-for-custom-connectors-d733fdb9-6108-4199-b4f5-06e99b02d10f
I am able to obtain an access token using the same configuration patterns I am setting in my Custom Connector, and use it to make the equivalent 'Operations' (API Requests) in Postman. I am therefore stumped and not sure where else I may be able to look to determine where the problem may be in the flow. Any help would be greatly appreciated. I will post my sanitized settings, maybe someone is able to see something that I cannot.
Here is my Connector security configuration. Just a note: I am having to use Generic OAuth 2.0 as the Identity Provider instead of Salesforce, as the Salesforce Identity Provider throws an unknown exception with Salesforce after I complete the SSO flow. This issue was also reported here, with what looks like a working resolution: https://powerusers.microsoft.com/t5/Connecting-To-Data/Custom-Connector-to-Salesforce-and-Refresh-Token-Issue/td-p/194982
Here is the definition of my Operation:
Here is the response:
Verification that Connection is Connected:
Here are my Connected App settings, if it helps (i've confirmed I can communicate with the Connected App using Postman, and the initial Connection establishes correctly with the Connected App):
Any and all help appreciated - thank you!
This fixed my issue; thank you so much for the second set of eyes!
WarrenBelz
770
Most Valuable Professional
stampcoin
494
MS.Ragavendar
399