HomeAboutAll PostsVideosSearchRSS

PnP.PowerShell App Registration

By Denis Molodtsov
Published in SharePoint
August 05, 2025
1 min read
PnP.PowerShell App Registration
Table of contents

Hi there, SharePoint enthusiasts! I want to share the manual on how to correctly configure the PnP.PowerShell app in Entra ID.

Prerequisites

  • Global Administrator access to your Microsoft 365 tenant
  • Windows 10/11 operating system

Installation Steps

Step 1: Install PowerShell 7

PowerShell 7 is required for compatibility with the latest PnP.PowerShell module. If PowerShell 7 is not installed, you can install it using the Windows Package Manager (winget):

powershell
winget install --id Microsoft.PowerShell --source winget

Step 2: Install PnP.PowerShell Module

Launch PowerShell 7 and run:

powershell
Install-Module PnP.PowerShell -AllowClobber -Scope CurrentUser

When prompted:

  • Select [Y] Yes to install from PSGallery
  • Wait for the installation to complete

Step 3: Register the Azure App

Create a new Azure App registration with the following command:

powershell
Register-PnPEntraIDAppForInteractiveLogin -ApplicationName "PnP.PowerShell v2" -Tenant yourtenant.onmicrosoft.com
  1. A browser window will open automatically
  2. Sign in with your Global Administrator account
  3. Review the requested permissions
  4. Click Accept to grant consent for your organization

Permissions Granted

The app registration will request the following permissions:

  • User.Read - Sign in and read user profile
  • Sites.FullControl.All - Full control of all site collections
  • Group.ReadWrite.All - Read and write all groups
  • TermStore.ReadWrite.All - Read and write term store data

Permissions granted
Permissions granted

Step 5: Document the Application ID

After successful registration, PowerShell will display your Application (Client) ID:

Azure App ID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

Step 6: Test the Connection

Verify your setup by connecting to SharePoint Online:

powershell
# Store your App ID in a variable
$AzureAppId = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
# Connect to SharePoint Online
Connect-PnPOnline https://yourtenant.sharepoint.com -Interactive -ClientId $AzureAppId
# Test the connection
Get-PnPSite

Replace:

  • XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX with your actual Azure App ID
  • yourtenant with your tenant name

Bonus: Grant Sites.Selected permission to the specific app for a specific SharePoint Site

PowerShell
Grant-PnPAzureADAppSitePermission -AppId "XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" -DisplayName "App Name" -Permissions FullControl -Site https://[Tenant].sharepoint.com/sites/SITE_URL

Read more about Grant-PnPAzureADAppSitePermission

Found this useful? Follow me on LinkedIn to see my new posts.
Follow on LinkedIn

Tags

SharePointPnP.PowerShellPowerShell

Share

Previous Article
SharePoint News Webpart Dimensions for Designers
Denis Molodtsov

Denis Molodtsov

Microsoft 365 Architect

Microsoft Most Valuable Professional (MVP)

Related Posts

Your organization's policies don't allow you to share with these users: Lockdown Mode After a ShareGate Migration
Your organization's policies don't allow you to share with these users: Lockdown Mode After a ShareGate Migration
October 28, 2026
5 min

Quick Links

AboutAll PostsRSS

Social Media