# App + user token

Use this approach if you want an access token to have app + user context. In this case, EmbedFAST will retrieve user identification from the token and use it for authentication and authorization (access control and validation).

{% hint style="info" %}
**Note:**&#x20;

* The EmbedFAST Admin API **requires** this approach.
* The EmbedFAST User (Client) API can use this approach if authentication and authorization are integrated with Microsoft Entra ID.
{% endhint %}



1. Log into [Postman](https://www.postman.com/).
2.  Go to the **Workspaces** tab > **My Workspace**.\


    <figure><img src="https://2643060172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIwWVFb1sEdUq6IwVu5D2%2Fuploads%2F1eDXBjRLYZx6HSY5mAb0%2Fimage.png?alt=media&#x26;token=2210ee35-fa4c-4272-bda3-4289ca28efe1" alt=""><figcaption></figcaption></figure>
3. Click on the **+** icon next to the **Overview** tab to create a new request.

<figure><img src="https://2643060172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIwWVFb1sEdUq6IwVu5D2%2Fuploads%2FZh4nzgbHdElwEook4Zyc%2Fimage.png?alt=media&#x26;token=374a5ce0-7560-42c8-82ee-134239856898" alt=""><figcaption></figcaption></figure>

4. This will take you to a new request page.

<figure><img src="https://2643060172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIwWVFb1sEdUq6IwVu5D2%2Fuploads%2FcdTeZHeclgQ1KeWgHPcB%2Fimage.png?alt=media&#x26;token=a139c530-3f33-4eae-bd61-621f45715165" alt=""><figcaption></figcaption></figure>

5. Click on the **Authorization** tab below the entry field.

<figure><img src="https://2643060172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIwWVFb1sEdUq6IwVu5D2%2Fuploads%2FzJWch31q7fzzSPyIQkn3%2Fimage.png?alt=media&#x26;token=d9050b24-0a70-44db-afcf-a68eddb9ece2" alt=""><figcaption></figcaption></figure>

6. From the drop-down menu next to **Type**, select **OAuth 2.0**.

<figure><img src="https://2643060172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIwWVFb1sEdUq6IwVu5D2%2Fuploads%2FEm3mQnyf5jsPG67fSp8F%2Fimage.png?alt=media&#x26;token=192a9346-153c-432d-9cd3-03bb6b9f035a" alt=""><figcaption></figcaption></figure>

7. Add parameters under the **Configure New Token** section as detailed in the table below:

<figure><img src="https://2643060172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIwWVFb1sEdUq6IwVu5D2%2Fuploads%2FkW54rhx1PiPsIjydDvhs%2Fimage.png?alt=media&#x26;token=d0b07f14-225a-4f5a-9204-879bbc81da02" alt=""><figcaption></figcaption></figure>

| **Parameters**        | **Inputs**                                                                    |
| --------------------- | ----------------------------------------------------------------------------- |
| Token Name            | Create and enter a token name                                                 |
| Grant Type            | Select **Implicit**                                                           |
| Callback URL          | **https://oauth.pstmn.io/v1/browser-callback**                                |
| Auth URL              | **https://login.microsoftonline.com/\<Your-Tenant-ID>/oauth2/v2.0/authorize** |
| Client ID             | Enter the client ID of the EmbedFAST API's app registration                   |
| Scope                 | Enter the scope added in the EmbedFAST API's app registration                 |
| State                 | Leave this blank                                                              |
| Client Authentication | **Send as basic Auth header**                                                 |

{% hint style="info" %}
**Reminder:** Ensure that the callback URL is added as a redirect URI in the app registration for the EmbedFAST API, as detailed in [previous sections](../add-the-redirect-uris).
{% endhint %}

8. Click on **Get New Access Token** after entering the parameters detailed above.\


<figure><img src="https://2643060172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIwWVFb1sEdUq6IwVu5D2%2Fuploads%2FnmUsv1HAhuWjvzZhRVbr%2Fimage.png?alt=media&#x26;token=e5a10b02-40aa-4abc-9d49-87a90c22736d" alt=""><figcaption></figcaption></figure>

9. A dialog box will appear which confirms the completion of the authentication.\
   \


<figure><img src="https://2643060172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIwWVFb1sEdUq6IwVu5D2%2Fuploads%2FR7HGjWi6N8htnXqMOkKp%2Fimage.png?alt=media&#x26;token=612d379d-0a29-4415-bb56-1381f7b9ea15" alt=""><figcaption></figcaption></figure>

10. You can copy the access token from the page shown below.\


    <figure><img src="https://2643060172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIwWVFb1sEdUq6IwVu5D2%2Fuploads%2Fszd4UOYrKvwuHrY2S4TU%2Fimage.png?alt=media&#x26;token=606d406d-6ed7-4422-90f2-ecda60a38a7d" alt=""><figcaption></figcaption></figure>
