Skip to content

Commit 95eac5c

Browse files
authored
Merge pull request #104065 from k5-maeda/patch-1
Update manage-application-permissions.md
2 parents 24cded6 + 98560bf commit 95eac5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

articles/active-directory/manage-apps/manage-application-permissions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ $assignments | ForEach-Object {
103103
Using the following Microsoft Graph PowerShell script revokes all permissions granted to an application.
104104

105105
```powershell
106-
Connect-MgGraph -Scopes "Application.ReadWrite.All", "Directory.ReadWrite.All", "DelegatedPermissionGrant.ReadWrite.All" "AppRoleAssignment.ReadWrite.All"
106+
Connect-MgGraph -Scopes "Application.ReadWrite.All", "Directory.ReadWrite.All", "DelegatedPermissionGrant.ReadWrite.All", "AppRoleAssignment.ReadWrite.All"
107107
108108
# Get Service Principal using objectId
109109
$sp = Get-MgServicePrincipal -ServicePrincipalID "$ServicePrincipalID"
@@ -119,7 +119,7 @@ $spOauth2PermissionsGrants |ForEach-Object {
119119
}
120120
121121
# Get all application permissions for the service principal
122-
$spApplicationPermissions = Get-MgServicePrincipalAppRoleAssignedTo -ServicePrincipalId $Sp.Id -All | Where-Object { $_.PrincipalType -eq "ServicePrincipal" }
122+
$spApplicationPermissions = Get-MgServicePrincipalAppRoleAssignment -ServicePrincipalId $Sp.Id -All | Where-Object { $_.PrincipalType -eq "ServicePrincipal" }
123123
124124
# Remove all application permissions
125125
$spApplicationPermissions | ForEach-Object {

0 commit comments

Comments
 (0)