Skip to content

Create App Registration

Gunjan Datta edited this page Oct 16, 2025 · 4 revisions

The function app will use the SharePoint PnP PowerShell library to make configuration changes to SharePoint sites. We will need to create an application registration in Microsoft Entra and create certificate for the Function App. This application will need to be able to make changes to all sites in the tenant, which is the Sites.FullControl.All graph api permission.

Requirements

A certificate will need to be generated and provided for this step. This is usually provided by the client, but for dev/test purposes, you can refer to Create Self Signing Certificate for details on creating a self-signing certificate.

Step 1. Create App Registration

Access Microsoft Entra and click on App Registration from the Applications menu navigation. Click on New registration to create an application registration.

Create App Registration

Step 2. Register App

Set the name and click on Register to create the app registration.

Register App

Step 3. Save Information

Note the application (client) id and tenant information from the app registration, and click on Certificates & secrets from the sub-menu.

App Registration

Step 5. Add Certificate

Upload Certificate

Step 6. Add API Permission

Select API permissions from the sub-menu, and click on + Add a permission.

Add Permissions

Step 7. Add Graph Permission

Click on Graph API.

Add Graph Permission

Step 8. Select Permission

Search for Sites and select the Sites.FullControl.All permission.

Select Permission

Step 9. Add Permissions

Repeat steps 6-8 and add the following permissions:

  • Graph API -> Directory.Read.All
  • SharePoint -> Sites.FullControl.All

Step 10. Grant Permission

The permission will not be applied, until you grant the permission. Click on Grant admin consent for Microsoft and confirm the selection.

Grant Permission

Clone this wiki locally