You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-web-pubsub/howto-authorize-from-application.md
+1-40Lines changed: 1 addition & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Authorize an application request by using Microsoft Entra ID
3
3
description: Learn how to authorize an application request to Web PubSub resources by using Microsoft Entra ID.
4
4
author: terencefan
5
5
ms.author: tefa
6
-
ms.date: 08/16/2024
6
+
ms.date: 09/06/2024
7
7
ms.service: azure-web-pubsub
8
8
ms.topic: conceptual
9
9
---
@@ -111,45 +111,6 @@ To learn more about how to assign and manage Azure role assignments, see these a
111
111
-[Assign Azure roles by using the Azure CLI](../role-based-access-control/role-assignments-cli.md)
112
112
-[Assign Azure roles by using an Azure Resource Manager template](../role-based-access-control/role-assignments-template.md)
113
113
114
-
## Use Postman to get the Microsoft Entra token
115
-
116
-
1. Open Postman.
117
-
118
-
1. For **Method**, select **GET**.
119
-
120
-
1. For **URI**, enter `https://login.microsoftonline.com/<TENANT ID>/oauth2/token`. Replace `<TENANT ID>` with the value for **Directory (tenant) ID** on the **Overview** pane of the application you created.
121
-
122
-
1. Select the **Headers** tab, and then add the following keys and values:
123
-
124
-
1. For **Key**, select **Content-Type**.
125
-
1. For **Value**, enter `application/x-www-form-urlencoded`.
126
-
127
-
:::image type="content" source="media/howto-authorize-from-application/get-azure-ad-token-using-postman.png" alt-text="Screenshot that shows information on the Basic tab when you use Postman to get the token.":::
128
-
129
-
1. Select the **Body** tab.
130
-
1. Select the body type **x-www-form-urlencoded**.
131
-
1. Under **Key**, add the following keys and values:
132
-
133
-
1. Select **grant_type**, and then select the value **client_credentials**.
134
-
1. Select **client_id**, and then paste the value of **Application (client) ID** from the **Overview** pane of the application you created.
135
-
1. Select **client_secret**, and then paste the value of the client secret you saved.
136
-
1. Select **resource**, and then enter `https://webpubsub.azure.com` for the value.
137
-
138
-
:::image type="content" source="media/howto-authorize-from-application/get-azure-ad-token-using-postman-body.png" alt-text="Screenshot that shows the Body tab parameters when you use Postman to get the token.":::
139
-
140
-
For an OAuth2/v2.0/token endpoint, pass the value for `scope` instead of the value for `resource`:
141
-
142
-
```json
143
-
client_id: *your client ID*
144
-
client_secret: *your client secret*
145
-
grant_type: client_credentials
146
-
scope: https://webpubsub.azure.com/.default
147
-
```
148
-
149
-
1. Select **Send** to send the request to get the token. The value for `access_token` is the access token.
150
-
151
-
:::image type="content" source="media/howto-authorize-from-application/get-azure-ad-token-using-postman-response.png" alt-text="Screenshot that shows the response token when you use Postman to get the token.":::
152
-
153
114
## Code samples that use Microsoft Entra authorization
154
115
155
116
Get samples that use Microsoft Entra authorization in our four officially supported programming languages:
0 commit comments