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:
Copy file name to clipboardExpand all lines: articles/azure-web-pubsub/howto-generate-client-access-url.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -251,7 +251,11 @@ You could also use Microsoft Entra ID and generate the token by invoking [Genera
251
251
> [!NOTE]
252
252
> Web PubSub does not recommend that you create Microsoft Entra ID tokens for Microsoft Entra ID service principals manually. This is because each Microsoft Entra ID token is short-lived, typically expiring within one hour. Afterthis time, you must manually generate a replacement Microsoft Entra IDtoken. Instead, use [our SDKs](#generate-from-service-sdk) that automatically generate and replace expired Microsoft Entra ID tokens for you.
253
253
254
-
1. Follow [Authorize from application ](./howto-authorize-from-application.md#add-a-client-secret) to enable Microsoft Entra ID and add a client secret.
254
+
1. Follow [Authorize from application](./howto-authorize-from-application.md) to enable Microsoft Entra ID.
255
+
256
+
1. Get the Microsoft Entra token.
257
+
258
+
1. Use the Microsoft Entra token to invoke `:generateToken`.
0 commit comments