Skip Ribbon Commands
Skip to main content

Quick Launch

Todd Klindt's home page > Todd Klindt's Office 365 Admin Blog > Posts > How to Register the PnP.PowerShell App Registration if You’re not a Tenant Admin
June 25
How to Register the PnP.PowerShell App Registration if You’re not a Tenant Admin

I’ve done a few articles about the new PnP.PowerShell module. One of the biggest changes from its ancestor, SharePointPnPPowerShellOnline, is that it requires the registration of an Azure Application before you can connect with it. In this blog post I’m going to explain how to get that Azure App registered if you’re not a Tenant Admin in your tenant.

You don’t need to be a Tenant Admin to use the PnP.PowerShell cmdlets. You don’t even need to be a SharePoint Admin or a site collection admin. There are plenty of cmdlets you can run, like Add-PnPFile if you’re only a Member of the site. However, before you can run the most import PnP cmdlet of all, Connect-PnPOnline, the PnP Azure Application has to be registered in your tenant by a tenant admin. If it’s not, you’ll get a sad message that looks like this: 


Here’s the text:

Connect-PnPOnline: AADSTS65001: The user or administrator has not consented to use the application with ID '31359c7f-bd7e-475c-86db-fdb8c937548e' named 'PnP Management Shell'. Send an interactive authorization request for this user and resource.

In most cases the person introducing the PnP.PowerShell module is a tenant admin, so it’s not an issue. They run Register-PnPManagementShellAccess and Bob’s your uncle. But it’s not uncommon for an organization to be large enough that the SharePoint or Microsoft 365 Admin team is not a tenant admin. In that case the Tenant Admin, who likely doesn’t know what a PnP.PowerShell is, has to register the Azure App before the SharePoint Admin can enjoy the bliss that is PnP.PowerShell. Fortunately, there’s an easy enough solution, the Consent URL.

The Consent URL is the URL to a web page your Tenant Admin can go to to consent the PnP.PowerShell Azure App without needing to install anything, or really know anything about the PnP.PowerShell. There are a few ways to get the Consent URL. It doesn’t matter how you do it, they all get you to the same place.

The easiest way to remember is to run Register-PnPManagementShellAccess –ShowConsentUrl after installing the PnP.PowerShell. You’ll be asked to log in, but you don’t need to be an sort of admin. It’s only logging in so it knows when tenant you’re in. Then it will give you the Consent URL. It looks like this:


The part in the red box is your tenant’s ID.You had to log so the cmdlet could get that number. The Client_id refers to the PnP.PowerShell, so it’s the same everywhere. 

You can also specify your tenant’s name instead of its ID. This works as well:

Whether you get the URL from running Register-PnPManagementShellAccess –ShowConsentUrl or by copying it out of this blog post and putting your tenant’s information, send that URL to your Tenant Admin. When they browse to the page it will look like this:


All they need to do is click Accept and you’re ready to go.

That’s a pretty long, scary list of permissions, and it might spook some admins. Accepting this does not give everyone in your tenant all of those permissions. The PnP.PowerShell Azure App uses Delegation, which means any user using it to access objects in Microsoft 365 has to have permission to access it. The PnP.PowerShell does not allow anyone access to anything they don’t otherwise have access to. If they don’t believe you, have them try. Have someone that cannot open up a SharePoint site in the browser try to connect to it with Connect-PnPOnline. They won’t be able to.

If they want to check out what the Azure App has permission to, or heaven forbid, remove it, you can browse to the Azure AD Portal and find it in the Enterprise Applications.


The Permissions blade will show you all delegated permissions the app has. Feel free to poke around, but resist the urge to change any, even if you’re positive you’ll never use them. I promise it’ll only hurt you in the future.

After your tenant admin has done all of that you should be able to get back to all that PowerShell and PnP goodness.




No Images on Post

The images are not appearing on this post.  And clicking them results in a 404 Not Found message.
 on 2/8/2022 10:19 AM


Thank you for sharing this article.
 on 10/11/2023 4:03 AM


Interesting articles keep posting more!
 on 10/25/2023 9:36 PM


Regards for those content and additionally awesome helpful hints.. still Document equally suspect that exertions is normally crucial element of possessing financial success. <a href="">generating bankruptcy attorney leads</a>
 on 10/30/2023 12:20 PM


Regards for those content and additionally awesome helpful hints.. still Document equally suspect that exertions is normally crucial element of possessing financial success. generating bankruptcy attorney leads
 on 10/30/2023 12:20 PM


Appreciate it with the write-up in addition to good points.. possibly When i likewise imagine that working hard is usually an important part of having achievements. children's book writer for hire
 on 11/2/2023 2:33 AM

pokemon game

I successfully registered the Azure App which has opened up a world of possibilities for my work within Microsoft 365.
 on 11/7/2023 12:31 AM


Ones new music is usually wonderful. You could have many incredibly proficient painters. When i hope people the most beneficial connected with achievements. must visit restaurant seminyak
 on 11/7/2023 5:12 AM

Re: How to Register the PnP.PowerShell App Registration if You’re not a Tenant Admin

Whether it's integrating smart technology, embracing bold design choices, or focusing on sustainable practices, the trends in bathroom remodeling indicate a commitment to creating personalized and modern spaces in Midlothian homes.
 on 11/9/2023 11:37 PM

A great explanation

This post provides useful information about the new PnP.PowerShell module and its requirement for the registration of an Azure Application before connecting. Thanks!
 on 11/17/2023 2:06 AM
1 - 10Next

Add Comment

Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.


Body *

Today's date *

Select a date from the calendar.
Please enter today's date so I know you are a real person


Want a message when I reply to your comment? Put your Twitter handle here.