Since Microsoft is set to deprecate the Azure AD Powershell cmdlets soon™ I’m taking the opportunity to upgrade some scripts I’m using from AzureAD to Graph API, and the one showcased today is the script to add Graph API permissions to an Azure AD Application.
Warning: You have to be or to have escalated to Global Admin for the addition to work!
Download it using your preferred tool (I personally use Github Desktop), then get the Application ID of your application from here:
And then run the powershell script like this:
.\Update-GraphAPIPermissions.ps1 -ApplicationID "yourapplicationid" -PermissionsToAdd @("yourpermissions") #(optional, by default it will add Mail.Send)
It will ask you to connect to graph api if you haven’t and grant permissions to your account:
And then it will execute the addition: