Create Permissions for SharePoint Online

This article provides instructions on how to create app permissions for SharePoint site by using PowerShell.

1. Install a PowerShell Module

Install-Module -Name PnP.PowerShell
Click to copy

2. Connect to SharePoint Site

Connect-PnPOnline -Interactive
Click to copy

You will be prompted to enter the credentials including the second factor.

3. Grant the write Permission to Active Directory App

Grant-PnPAzureADAppSitePermission -AppId 'AzureAppIdwithSitesdotselectedpermission' -DisplayName 'App Name here' -Site '' -Permissions Write
Click to copy

4. Verify the Result