How to configure access to SharePoint Online

A common "Promodag Reports Application" is now used to access Office 365 and SharePoint Online.

It does, however, require additional permissions to access SharePoint Online.

Prerequisites

  1. The "Promodag Reports Application" must have been created and registered in Microsoft Entra ID, see Certificate-based authentication to Office 365.
  2. Go to Tools > Options, Office 365 Configuration and copy the Application Id of the "Promodag Reports Application" in a text file. You will need it in the next steps.

Authorize the Promodag Reports Application to write into your SP site

The assignment of the permission on the chosen SharePoint site is done through PnP PowerShell Module.

a. Install PnP PowerShell

Run PowerShell 7.x and enter this command: Install-Module -Name PnP.PowerShell -RequiredVersion 2.2.0

b. Allow PnP PowerShell to create its own app in Azure

Run PowerShell 7.x and enter this command: Connect-PnPOnline -Url https://<your company>.sharepoint.com/ -Interactive

The Microsoft PnP Management Shell app is created in Microsoft Entra ID. It contains the commands needed to grant the required permissions to the Promodag Reports Application.

c. Grant permission to the Promodag SharePoint Application in SharePoint Online

Grant-PnPAzureADAppSitePermission -AppId 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' -DisplayName 'Promodag Reports Application' -Permissions Write

The App ID matches the "Promodag Reports Application".

Grant-PnPAzureADAppSitePermission -AppId 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' -DisplayName 'Promodag Reports Application' -Site 'https://<your company>.sharepoint.com/sites/<sub-site> -Permissions Write