# How to get access token in salesforce after successful social login

**URL:** <https://community.auth0.com/t/how-to-get-access-token-in-salesforce-after-successful-social-login/69541>\
**Category:** Get Help\
**Tags:** salesforce, api, social-connections, sso, auth0\
**Created:** [September 13, 2021, 2:25pm UTC](https://community.auth0.com/t/how-to-get-access-token-in-salesforce-after-successful-social-login/69541 "2021-09-13T14:25:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![keyur.jain](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/keyur.jain/32/30828_2.png) [@keyur.jain](https://community.auth0.com/u/keyur.jain)\
**Post date:** [September 13, 2021, 2:25pm UTC](https://community.auth0.com/t/how-to-get-access-token-in-salesforce-after-successful-social-login/69541/1 "2021-09-13T14:25:17Z")

</div>

Hi @dan.woda,  
I have successfully setup salesforce social login in auth0 and tested it.  
what api of auth0 can i call to get access token if i am already logged in into salesforce into my browser.

---

<div class="post-metadata">

**Author:** ![keyur.jain](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/keyur.jain/32/30828_2.png) [@keyur.jain](https://community.auth0.com/u/keyur.jain)\
**Post date:** [September 23, 2021, 3:30pm UTC](https://community.auth0.com/t/how-to-get-access-token-in-salesforce-after-successful-social-login/69541/2 "2021-09-23T15:30:07Z")

</div>

@sgo @konrad.sopala @rueben.tiow @nicolas_sabena @josh.cunningham @markus.schrickel  
can you please help me?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [September 24, 2021, 6:32pm UTC](https://community.auth0.com/t/how-to-get-access-token-in-salesforce-after-successful-social-login/69541/4 "2021-09-24T18:32:22Z")

</div>

Hi @keyur.jain,

Thanks for reaching out to the Auth0 Community!

I understand that you’d like to get the Access Token for an authenticated user using the Salesforce Social Connection.

To do so, you can make a GET request to the Management API [`/api/v2/users`](https://auth0.com/docs/api/management/v2#!/Users/get_users_by_id) endpoint after the user has authenticated, and find the access token for the identity provider in the `identities` array, under the element for the Salesforce connection.

Here is an example when using the Google Social Connection:

```auto
"identities": [
    {
      "provider": "google-oauth2",
      "access_token": "ya29.a0ARrdaM_vh...",
      "expires_in": 3599,
      "user_id": "105080075773820224778",
      "connection": "google-oauth2",
      "isSocial": true
    }

```

Our documentation here goes into more details: [https://auth0.com/docs/security/tokens/access-tokens/identity-provider-access-tokens](https://auth0.com/docs/security/tokens/access-tokens/identity-provider-access-tokens)

Please let me know if you have any questions. I’d be happy to assist.

Thank you.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [October 15, 2021, 7:42pm UTC](https://community.auth0.com/t/how-to-get-access-token-in-salesforce-after-successful-social-login/69541/5 "2021-10-15T19:42:59Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
