Skip to content

Commit 42f2634

Browse files
authored
Merge pull request #98511 from hpsin/patch-49
Details on offlineaccess consent
2 parents 8d49b24 + ae55d72 commit 42f2634

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ms.workload: identity
1414
ms.tgt_pltfrm: na
1515
ms.devlang: na
1616
ms.topic: conceptual
17-
ms.date: 04/12/2019
17+
ms.date: 12/10/2019
1818
ms.author: ryanwi
1919
ms.reviewer: hirsin, jesakowi, jmprieur
2020
ms.custom: aaddev
@@ -95,7 +95,10 @@ The `profile` scope can be used with the `openid` scope and any others. It gives
9595

9696
The [`offline_access` scope](https://openid.net/specs/openid-connect-core-1_0.html#OfflineAccess) gives your app access to resources on behalf of the user for an extended time. On the consent page, this scope appears as the "Maintain access to data you have given it access to" permission. When a user approves the `offline_access` scope, your app can receive refresh tokens from the Microsoft identity platform token endpoint. Refresh tokens are long-lived. Your app can get new access tokens as older ones expire.
9797

98-
If your app does not explicitly request the `offline_access` scope, it won't receive refresh tokens. This means that when you redeem an authorization code in the [OAuth 2.0 authorization code flow](active-directory-v2-protocols.md), you'll receive only an access token from the `/token` endpoint. The access token is valid for a short time. The access token usually expires in one hour. At that point, your app needs to redirect the user back to the `/authorize` endpoint to get a new authorization code. During this redirect, depending on the type of app, the user might need to enter their credentials again or consent again to permissions. While the `offline_access` scope is automatically requested by the server, your client must still request it in order to receive the refresh tokens.
98+
> [!NOTE]
99+
> This permission appears on all consent screens today, even for flows that don't provide a refresh token (the [implicit flow](v2-oauth2-implicit-grant-flow.md)). This is to cover scenarios where a client can begin within the implicit flow, and then move onto to the code flow where a refresh token is expected.
100+
101+
On the Microsoft identity platform (requests made to the v2.0 endpoint), your app must explicitly request the `offline_access` scope, to receive refresh tokens. This means that when you redeem an authorization code in the [OAuth 2.0 authorization code flow](active-directory-v2-protocols.md), you'll receive only an access token from the `/token` endpoint. The access token is valid for a short time. The access token usually expires in one hour. At that point, your app needs to redirect the user back to the `/authorize` endpoint to get a new authorization code. During this redirect, depending on the type of app, the user might need to enter their credentials again or consent again to permissions.
99102

100103
For more information about how to get and use refresh tokens, see the [Microsoft identity platform protocol reference](active-directory-v2-protocols.md).
101104

0 commit comments

Comments
 (0)