Here are some tips to handle the removal of app permissions through PowerShell
- Find the App ID :
$appId = (Get-AzADApplication -DisplayNameStartWith yourappname).ApplicationId
- Find the api permission id of 'Files.Read.All' :
$apiPermId=$(az ad sp show --id 00000003-0000-0000-c000-000000000000 --query "appRoles[?value=='Files.Read.All'].id" --output tsv)
- Delete the api permission 'Files.Read.All' from the app:
az ad app permission delete --id $appid --api 00000003-0000-0000-c000-000000000000 --api-permissions $apiPermId
Similar way, you can delete other permissions also
----------
--please don't forget to upvote
and Accept as answer
if the reply is helpful--