We have a client whose users would be using the same SSO identity provider to log into Salesforce, and also to log into an external service the client owns. We are also building an integration from Salesforce to that external service, but the integration uses a single API superuser.
Since the same SSO provider is used for both, the client is wondering if Salesforce has any capability to query the username from the SSO provider in order to be able to to pass that username to the external service in API requests.
I see that the
ThirdPartyAccountLink object (https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_thirdpartyaccountlink.htm) is where the SSO usernames are stored. So that's a good help. My question: Is there any way (in Apex, Visualforce, JS or whatever) to determine which SSO provider, if any, was used to log the user into their current session?