# Access Token to make api call to microsoft endpoint url

**URL:** <https://community.auth0.com/t/access-token-to-make-api-call-to-microsoft-endpoint-url/18703>\
**Category:** Get Help\
**Tags:** api\
**Created:** [December 4, 2018, 5:27pm UTC](https://community.auth0.com/t/access-token-to-make-api-call-to-microsoft-endpoint-url/18703 "2018-12-04T17:27:56Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![kandarprakeshbhai](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kandarprakeshbhai/32/10249_2.png) [@kandarprakeshbhai](https://community.auth0.com/u/kandarprakeshbhai)\
**Post date:** [December 4, 2018, 5:27pm UTC](https://community.auth0.com/t/access-token-to-make-api-call-to-microsoft-endpoint-url/18703/1 "2018-12-04T17:27:56Z")

</div>

Can we use the access token to make API call to the Microsoft outlook endpoint ? Or it is used for api that is created in auth0?

---

<div class="post-metadata">

**Author:** ![royce](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/royce/32/12096_2.png) [@royce](https://community.auth0.com/u/royce)\
**Post date:** [December 5, 2018, 1:43pm UTC](https://community.auth0.com/t/access-token-to-make-api-call-to-microsoft-endpoint-url/18703/2 "2018-12-05T13:43:54Z")

</div>

Hello! If I’m understanding you correctly, you’re looking to access your users’ Microsoft data via a Microsoft API – is that correct?

If so, take a look at the Microsoft option in [social connections](https://manage.auth0.com/#/connections/social). You’ll need to set that up and select the permissions that you want. I haven’t personally used the Microsoft IdP option, but I have used Google as an IdP.

In the case of Google, **the access\_token you receive from auth0 is not the token you use to access IdP APIs**. When a user logs in via Google, their access (and refresh token, if you opt to include one) will be stored in the user’s identities. We use the Auth0 User Management API on our backend to then access user identities and parse to find access/refresh tokens. These are the tokens used to access Google APIs.

Some reading that might be helpful:  
[https://auth0.com/docs/api/management/v2/create-m2m-app](https://auth0.com/docs/api/management/v2/create-m2m-app)

Hope that helps. If you would like any clarification or further assistance, please feel free to get in touch.

---

<div class="post-metadata">

**Author:** ![kandarprakeshbhai](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kandarprakeshbhai/32/10249_2.png) [@kandarprakeshbhai](https://community.auth0.com/u/kandarprakeshbhai)\
**Post date:** [December 5, 2018, 5:33pm UTC](https://community.auth0.com/t/access-token-to-make-api-call-to-microsoft-endpoint-url/18703/3 "2018-12-05T17:33:14Z")

</div>

@royce  
Ok, Thanks for the information. So is there any package I can use for Auth0 User Management API on backend side? I am kind of new user to auth0 so do not have much knowledge.

---

<div class="post-metadata">

**Author:** ![royce](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/royce/32/12096_2.png) [@royce](https://community.auth0.com/u/royce)\
**Post date:** [December 5, 2018, 7:04pm UTC](https://community.auth0.com/t/access-token-to-make-api-call-to-microsoft-endpoint-url/18703/4 "2018-12-05T19:04:43Z")

</div>

@kandarprakeshbhai  
No problem! Happy to help. So far as I remember, you don’t need any specific libraries and/or packages to make calls to the Auth0 User Management API. Reading through the machine-to-machine tutorial I linked should be helpful in getting started. The process we used for getting our IdP access tokens was:

1. POST to oauth/token Auth0 endpoint to get Auth0 User Management API access\_token.
2. GET to Auth0 API endpoint of choice (e.g., api/v2/users), passing the access\_token from step 1 in Authorization header as a bearer token.
3. Parse the returned content (specifically, the identities array) to get IdP token.
4. Use IdP access token to access social provider API (e.g., Google, Microsoft, etc.).

---

<div class="post-metadata">

**Author:** ![kandarprakeshbhai](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kandarprakeshbhai/32/10249_2.png) [@kandarprakeshbhai](https://community.auth0.com/u/kandarprakeshbhai)\
**Post date:** [December 5, 2018, 7:08pm UTC](https://community.auth0.com/t/access-token-to-make-api-call-to-microsoft-endpoint-url/18703/5 "2018-12-05T19:08:18Z")

</div>

@royce  
Thanks for your quick response. I got that part. I got access token but when I use that token to make request to IDP , I get response like sign into account. I am using postman to make api call. Any help with this?

---

<div class="post-metadata">

**Author:** ![royce](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/royce/32/12096_2.png) [@royce](https://community.auth0.com/u/royce)\
**Post date:** [December 5, 2018, 7:14pm UTC](https://community.auth0.com/t/access-token-to-make-api-call-to-microsoft-endpoint-url/18703/6 "2018-12-05T19:14:32Z")

</div>

@kandarprakeshbhai  
Ah, I see. Unfortunately, I’m not experienced with using Postman for testing these APIs. From what you’re saying though, that would be the expected behavior – your users **should** be prompted to log in to their social IdPs.

If I remember right, Auth0 does have some docs on using Postman to test out their various APIs. If you haven’t already, maybe head over to [auth0.com](http://auth0.com) and run some searches there?

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [December 11, 2018, 5:37pm UTC](https://community.auth0.com/t/access-token-to-make-api-call-to-microsoft-endpoint-url/18703/8 "2018-12-11T17:37:19Z")

</div>

Yep! @kandarprakeshbhai you can find all crucial Auth0 docs related to Postman here:

> **[Auth0 APIs](https://auth0.com/docs/api)**
>
> Learn about Auth0's Management and Authentication APIs.

Let us know if you need further help!

---

<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:** [August 28, 2019, 2:32pm UTC](https://community.auth0.com/t/access-token-to-make-api-call-to-microsoft-endpoint-url/18703/9 "2019-08-28T14:32:58Z")

</div>

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