Skip to content

Commit 4a222c0

Browse files
(AzureCXP) fixes MicrosoftDocs/azure-docs#94803
Updated line 22 as per the suggestion to add refresh token details
1 parent dd78840 commit 4a222c0

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

articles/active-directory/develop/v2-oauth2-client-creds-grant-flow.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ms.custom: aaddev, identityplatformtop40
1919

2020
You can use the OAuth 2.0 client credentials grant specified in [RFC 6749](https://tools.ietf.org/html/rfc6749#section-4.4), sometimes called *two-legged OAuth*, to access web-hosted resources by using the identity of an application. This type of grant is commonly used for server-to-server interactions that must run in the background, without immediate interaction with a user. These types of applications are often referred to as *daemons* or *service accounts*.
2121

22-
This article describes how to program directly against the protocol in your application. When possible, we recommend you use the supported Microsoft Authentication Libraries (MSAL) instead to [acquire tokens and call secured web APIs](authentication-flows-app-scenarios.md#scenarios-and-supported-authentication-flows). Also take a look at the [sample apps that use MSAL](sample-v2-code.md).
22+
This article describes how to program directly against the protocol in your application. When possible, we recommend you use the supported Microsoft Authentication Libraries (MSAL) instead to [acquire tokens and call secured web APIs](authentication-flows-app-scenarios.md#scenarios-and-supported-authentication-flows). Also take a look at the [sample apps that use MSAL](sample-v2-code.md).As a side note, refresh tokens will never be granted with this flow. This would not be useful given that client_id and client_secret, which would be required to obtain a refresh token, can be used to obtain an access token instead.
2323

2424
The OAuth 2.0 client credentials grant flow permits a web service (confidential client) to use its own credentials, instead of impersonating a user, to authenticate when calling another web service. For a higher level of assurance, the Microsoft identity platform also allows the calling service to authenticate using a [certificate](#second-case-access-token-request-with-a-certificate) or federated credential instead of a shared secret. Because the application's own credentials are being used, these credentials must be kept safe - _never_ publish that credential in your source code, embed it in web pages, or use it in a widely distributed native application.
2525

@@ -71,9 +71,6 @@ When authenticating as an application (as opposed to with a user), you can't use
7171

7272
For more information about application permissions, see [Permissions and consent](v2-permissions-and-consent.md#permission-types).
7373

74-
#### Refreshing Tokens
75-
The client credentials grant does not issue a refresh token. There is no benefit to issue refresh token with the client credential flow over just using the client id and client secret again.
76-
7774
#### Recommended: Sign the admin into your app to have app roles assigned
7875

7976
Typically, when you build an application that uses application permissions, the app requires a page or view on which the admin approves the app's permissions. This page can be part of the app's sign-in flow, part of the app's settings, or it can be a dedicated "connect" flow. In many cases, it makes sense for the app to show this "connect" view only after a user has signed in with a work or school Microsoft account.

0 commit comments

Comments
 (0)