Custom permissions for Managed Identity to authenticate with PNP PowerShell in Azure Functions #2820
Unanswered
callumlinning
asked this question in
Q&A
Replies: 1 comment
-
If you are using Windows Graph you can grant access to selected sites only. The sample below shows how to do this (I don't think there is a UI way to do this yet).
NOTE: If using SharePoint API you grant access to SharePoint > Sites.Selected instead |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using a Managed Identity to authenticate with PNP PowerShell to run a script in an Azure Function App. I have assigned my app "Sites.FullControl.All" using the following command:
Add-PnPAzureADServicePrincipalAppRole -Principal "Object ID" -AppRole "Sites.FullControl.All" -BuiltInType SharePointOnline
This works as expected. The problem is I want to be able to lock it down to run on specific sites in my tenant, so the principal doesn't have full control over all sites in the tenant. Does anyone know if this is currently possible? I know this is a relatively new cmdlet that's only available in the nightly release at the moment, but I was wondering if anyone had any experience or help to offer.
Beta Was this translation helpful? Give feedback.
All reactions