Forum Discussion
Revoke all Graph write permission for an Enterprise Application in Azure AD
Hello bhartisemwal1990 ,
You can use PowerShell to remove granted permissions.
Please, look at this:
Revoke permissions using PowerShell commands
Remove-AzureADOAuth2PermissionGrant (AzureAD) | Microsoft Docs
Hello mikhailf ,
Thanks for the help!
I tried executing the command ,following the article it doesn't seems to work for enterprise application.
I am trying to remove scope from Enterprise application for ShareGate Migration tool.
I have ever tried it for Enterprise application?
Pls find below snippet i tried to run
$ShareGateTool= Get-AzureADServicePrincipal | Where-Object {$_.DisplayName -eq "ShareGate migration tool 2.0"}
$ShareGateToolONotes= Get-AzureADOAuth2PermissionGrant | Where-Object {$_.ResourceId -eq $ShareGateTool.ObjectId} | Where-Object {$_.Scope -eq "Notes.ReadWrite.All"}
Remove-AzureADOAuth2PermissionGrant -ObjectId $ShareGateToolONotes.ObjectId