Created
March 14, 2023 21:18
-
-
Save AlexanderHolmeset/e7f6f1a8c0ac9968c1ea9183d13f4f83 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Connect using your tenants SharePoint admin url. | |
Connect-PnPOnline -Url M365x28850929-admin.sharepoint.com -Interactive | |
#Enter the App ID you coped from the Enterprise Application. | |
$ManagedIdentityID = "4bf49741-7819-47f1-9e30-c36ef6b9d1aa" | |
Add-PnPAzureADServicePrincipalAppRole -Principal $ManagedIdentityID -AppRole "Sites.ReadWrite.All" -BuiltInType MicrosoftGraph | |
Add-PnPAzureADServicePrincipalAppRole -Principal $ManagedIdentityID -AppRole "Sites.FullControl.All" -BuiltInType MicrosoftGraph | |
Add-PnPAzureADServicePrincipalAppRole -Principal $ManagedIdentityID -AppRole "Sites.FullControl.All" -BuiltInType SharePointOnline |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment