Skip to content

Latest commit

 

History

History
8 lines (7 loc) · 633 Bytes

api-assign-sites-selected.md

File metadata and controls

8 lines (7 loc) · 633 Bytes

Give a Managed Identity write access to a single Sharepoint Site

This example shows how to give a Managed Identity Graph API write access to a single Sharepoint site using the Graph API or SharePoint API permission "Sites.Selected".

Step 1

Give the Managed Identity the 'Sites.Selected' permission using this code. Be aware that 'Sites.Selected' is available for both the Graph API and the SharePoint API. Choose your weapon.

Step 2

Use the PnP.PowerShell module to assign write permissions for the Managed Identity. Using this code.