Skip to content

Commit 7bb326a

Browse files
authored
Update how-to-generate-auth-token.md
1 parent 5dee1b0 commit 7bb326a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

articles/energy-data-services/how-to-generate-auth-token.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ curl --location --request POST 'https://login.microsoftonline.com/<tenant-id>/oa
127127

128128
Generating a user's auth token is a two-step process.
129129

130-
### Get the authorization code
130+
### Get the authorization-code
131131

132132
The first step to get an access token for many OpenID Connect (OIDC) and OAuth 2.0 flows is to redirect the user to the Microsoft identity platform `/authorize` endpoint. Microsoft Entra ID signs the user in and requests their consent for the permissions your app requests. In the authorization code grant flow, after consent is obtained, Microsoft Entra ID returns an authorization code to your app that it can redeem at the Microsoft identity platform `/token` endpoint for an access token.
133133

@@ -139,7 +139,7 @@ The first step to get an access token for many OpenID Connect (OIDC) and OAuth 2
139139

140140
1. The browser redirects to `http://localhost:8080/?code={authorization code}&state=...` upon successful authentication.
141141
1. Copy the response from the URL bar of the browser and fetch the text between `code=` and `&state`.
142-
1. Keep this authorization code handy for future use.
142+
1. Keep this `authorization-code` handy for future use.
143143

144144
#### Request format
145145

@@ -188,8 +188,8 @@ The second step is to get the auth token and the refresh token. Your app uses th
188188
```bash
189189
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d 'client_id={client-id}
190190
&scope={client-id}%2f.default openid profile offline_access
191-
&code={authorization code}
192-
&redirect_uri=http%3A%2F%2Flocalhost%3a8080
191+
&code={authorization-code}
192+
&redirect_uri={redirect-uri}
193193
&grant_type=authorization_code
194194
&client_secret={client-secret}' 'https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/token'
195195
```

0 commit comments

Comments
 (0)