Skip to content

Commit 90bd41e

Browse files
author
gitName
committed
format
1 parent 72ebe99 commit 90bd41e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

articles/api-management/applications.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Review the settings for the client application in Microsoft Entra ID.
145145

146146
The application is named with the following format: **APIMApplication\<product-name\>**. For example, if the product name is **Starter**, the application name is similar to **APIMApplicationStarter**.
147147

148-
Review application settings in **App registrations**.
148+
Review application settings in **App registrations**:
149149

150150
1. Sign in to the Azure portal and navigate to **Microsoft Entra ID** > **Manage** > **App registrations**.
151151
1. Select **All applications**.
@@ -189,7 +189,6 @@ $body = @{
189189
}
190190
$response = Invoke-RestMethod -Method Post -Uri "https://login.microsoftonline.com/$tenantId/oauth2/v2.0/token" -ContentType "application/x-www-form-urlencoded" -Body $body
191191
$token = $response.access_token
192-
$token
193192
```
194193

195194
### Call product API using token
@@ -198,16 +197,16 @@ The token generated in the previous step is used to call a product API. The toke
198197

199198
```powershell
200199
201-
# $token = "...token here..."
202200
# Gatewate endpoint to call. Update with URI of API operation you want to call.
203201
$uri = "https://<gateway-hostname>/echo/resource?param1=sample"
204-
#
202+
# $token is the token generated in the previous step.
205203
$headers = @{
206204
   "Authorization" = "Bearer $token"
207205
}
208206
$body = @{
209207
    "hello" = "world"
210208
} | ConvertTo-Json -Depth 5
209+
211210
$getresponse = Invoke-RestMethod -Method Post -Uri $uri -ContentType "application/x-www-form-urlencoded" -Headers $headers -Body $body
212211
Write-Host "Response:"
213212
$getresponse | ConvertTo-Json -Depth 5

0 commit comments

Comments
 (0)