This article provides instructions on how to create app permissions for SharePoint site via either PowerShell or SharePoint Central Administration website.
PowerShell
1. Install a PowerShell Module
Install-Module -Name PnP.PowerShell
      
      
        Click to copy
      
    
3. Grant the write Permission to Active Directory App
Grant-PnPAzureADAppSitePermission -AppId 'AzureAppIdwithSitesdotselectedpermission' -DisplayName 'App Name here' -Site 'https://tenantname.sharepoint.com/sites/sitename' -Permissions Write
      
      
        Click to copy
      
    
