# Linking accounts

**URL:** <https://community.auth0.com/t/linking-accounts/62543>\
**Category:** Get Help\
**Tags:** account-linking, social-connections\
**Created:** [May 10, 2021, 11:11pm UTC](https://community.auth0.com/t/linking-accounts/62543 "2021-05-10T23:11:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bstaley0](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bstaley0/32/17239_2.png) [@bstaley0](https://community.auth0.com/u/bstaley0)\
**Post date:** [May 10, 2021, 11:11pm UTC](https://community.auth0.com/t/linking-accounts/62543/1 "2021-05-10T23:11:48Z")

</div>

Hello, when using account linking whether it is database and social or social and social do you get all access tokens? For example, let’s say if I log in with a database connection and link a Microsoft account. After awhile when the token expires when I prompted to log in and I use the database account will I still be able to fetch the access token for using Microsoft’s graph API since they are linked?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [May 11, 2021, 9:57pm UTC](https://community.auth0.com/t/linking-accounts/62543/3 "2021-05-11T21:57:27Z")

</div>

Hi @bstaley0,

After the user authenticates your application will receive an Auth0 issued access token, regardless of whether or not they log in with a microsoft account or an Auth0 DB account.

You can get the access tokens that are returned from the identity provider (e.g. Microsoft) by making an API call to the management API. Some IdPs will return a refresh token that Auth0 stores which you can use to request new IdP access tokens.

Here is the doc for it:

> **[Identity Provider Access Tokens](https://auth0.com/docs/secure/tokens/access-tokens/identity-provider-access-tokens)**
>
> Understand third-party access tokens issued by identity providers after user authentication and how to use them to call the third-party APIs.

You may have to play around with it to see what tokens the IdP provides and Auth0 stores.

---

<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:** [May 26, 2021, 9:57pm UTC](https://community.auth0.com/t/linking-accounts/62543/4 "2021-05-26T21:57:46Z")

</div>

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