Skip to content

Commit 50b0385

Browse files
authored
Update Invoke-AzRestMethod.md (#23564)
1 parent f225b84 commit 50b0385

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Accounts/Accounts/help/Invoke-AzRestMethod.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,15 @@ Content : {"properties":{"public":true,"url":"https://test-spring-service-dem
147147

148148
Get app "demo" under Spring cloud service "test-spring-service"
149149

150+
### Example 5
151+
```powershell
152+
# Replace *** with real values
153+
$payload = @{principalId="***"; resourceId="***"; appRoleId="***"} | ConvertTo-Json -Depth 3
154+
Invoke-AzRestMethod -Method POST -Uri https://graph.microsoft.com/v1.0/servicePrincipals/***/appRoleAssignedTo -Payload $payload
155+
```
156+
157+
Call Microsoft Graph API to assign App Role by constructing a hashtable, converting to a JSON string, and passing the payload to `Invoke-AzRestMethod`.
158+
150159
## PARAMETERS
151160

152161
### -ApiVersion

0 commit comments

Comments
 (0)