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
+27-3Lines changed: 27 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ This sample shows how to assign a `Web PubSub Service Owner` role to a service p
78
78
79
79
1. Click **Add > Add role assignment**.
80
80
81
-
1. On the **Roles** tab, select `Web PubSub App Server`.
81
+
1. On the **Roles** tab, select `Web PubSub Service Owner`.
82
82
83
83
1. Click **Next**.
84
84
@@ -107,7 +107,31 @@ To learn more about how to assign and manage Azure role assignments, see these a
107
107
-[Assign Azure roles using Azure CLI](../role-based-access-control/role-assignments-cli.md)
108
108
-[Assign Azure roles using Azure Resource Manager templates](../role-based-access-control/role-assignments-template.md)
109
109
110
-
## Sample codes
110
+
## Use Postman to get the Azure AD token
111
+
1. Launch Postman
112
+
113
+
2. For the method, select **GET**.
114
+
115
+
3. For the **URI**, enter `https://login.microsoftonline.com/<TENANT ID>/oauth2/token`. Replace `<TENANT ID>` with the **Directory (tenant) ID** value in the **Overview** tab of the application you created earlier.
116
+
117
+
4. On the **Headers** tab, add **Content-Type** key and `application/x-www-form-urlencoded` for the value.
118
+
119
+

120
+
121
+
5. Switch to the **Body** tab, and add the following keys and values.
122
+
1. Select **x-www-form-urlencoded**.
123
+
2. Add `grant_type` key, and type `client_credentials` for the value.
124
+
3. Add `client_id` key, and paste the value of **Application (client) ID** in the **Overview** tab of the application you created earlier.
125
+
4. Add `client_secret` key, and paste the value of client secret you noted down earlier.
126
+
5. Add `resource` key, and type `https://webpubsub.azure.com` for the value.
127
+
128
+

129
+
130
+
6. Select **Send** to send the request to get the token. You see the token in the `access_token` field.
131
+
132
+

133
+
134
+
## Sample codes using Azure AD auth
111
135
112
136
We officially support 4 programming languages:
113
137
@@ -120,4 +144,4 @@ We officially support 4 programming languages:
120
144
121
145
See the following related articles:
122
146
-[Overview of Azure AD for Web PubSub](concept-azure-ad-authorization.md)
123
-
-[Authorize request to Web PubSub resources with Azure AD from managed identities](howto-authorize-from-managed-identity.md)
147
+
-[Authorize request to Web PubSub resources with Azure AD from managed identities](howto-authorize-from-managed-identity.md)
0 commit comments