Skip to content

Commit 4b3d10c

Browse files
Merge pull request #42129 from Zawad/patch-2
Update documentation to have v2 adminconsent endpoint
2 parents 2dddffe + 3907f06 commit 4b3d10c

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

articles/active-directory/develop/v2-permissions-and-consent.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -183,29 +183,26 @@ When you're ready to request permissions from your organization's admin, you can
183183

184184
```
185185
// Line breaks are for legibility only.
186-
187-
GET https://login.microsoftonline.com/{tenant}/adminconsent?
188-
client_id=6731de76-14a6-49ae-97bc-6eba6914391e
189-
&state=12345
190-
&redirect_uri=http://localhost/myapp/permissions
186+
GET https://login.microsoftonline.com/{tenant}/v2.0/adminconsent?
187+
client_id=6731de76-14a6-49ae-97bc-6eba6914391e
188+
&state=12345
189+
&redirect_uri=http://localhost/myapp/permissions
190+
&scope=
191+
https://graph.microsoft.com/calendars.read
192+
https://graph.microsoft.com/mail.send
191193
```
192194

193-
```
194-
// Pro tip: Try pasting the below request in a browser!
195-
```
196195

197-
```
198-
https://login.microsoftonline.com/common/adminconsent?client_id=6731de76-14a6-49ae-97bc-6eba6914391e&state=12345&redirect_uri=http://localhost/myapp/permissions
199-
```
200-
201-
| Parameter | Condition | Description |
202-
| --- | --- | --- |
196+
| Parameter | Condition | Description |
197+
|--------------:|--------------:|:-----------------------------------------------------------------------------------------:|
203198
| `tenant` | Required | The directory tenant that you want to request permission from. Can be provided in GUID or friendly name format OR generically referenced with `common` as seen in the example. |
204199
| `client_id` | Required | The **Application (client) ID** that the [Azure portal – App registrations](https://go.microsoft.com/fwlink/?linkid=2083908) experience assigned to your app. |
205200
| `redirect_uri` | Required |The redirect URI where you want the response to be sent for your app to handle. It must exactly match one of the redirect URIs that you registered in the app registration portal. |
206201
| `state` | Recommended | A value included in the request that will also be returned in the token response. It can be a string of any content you want. Use the state to encode information about the user's state in the app before the authentication request occurred, such as the page or view they were on. |
202+
|`scope` | Required | Defines the set of permissions being requested by the application. This can be either static (using /.default) or dynamic scopes. This can include the OIDC scopes (`openid`, `profile`, `email`). |
203+
207204

208-
At this point, Azure AD requires a tenant administrator to sign in to complete the request. The administrator is asked to approve all the permissions that you have requested for your app in the app registration portal.
205+
At this point, Azure AD requires a tenant administrator to sign in to complete the request. The administrator is asked to approve all the permissions that you have requested in the `scope` parameter. If you've used a static (`/.default`) value, it will function like the v1.0 admin consent endpoint and request consent for all scopes found in the required permissions for the app.
209206

210207
#### Successful response
211208

0 commit comments

Comments
 (0)