I've been trying to connect to SharePoint using PnP Cmdlets after a few months of not using them. Whenever I attempt to connect using -UseWebLogin, I get an error saying that the command doesn't exist. I noticed there's a new option called Interactive, so I decided to give that a go. However, it's requesting a client ID or secret. I created an app registration with permissions for allSites.read and allSites.write, but the command just runs endlessly, eventually prompting a login window after a while, and then times out after logging in. Am I missing something, or is there an ongoing issue with PnP?
3 Answers
It would be helpful to see any error messages you’re getting. Also, it seems like you've been away from PnP for a while—using an Entra ID App Registration has been a requirement since last September. If -UseWebLogin isn’t an option anymore, then you're likely on PnP v3.x. Just to confirm, are you using PowerShell Core 7.4.6? And about the app setup, make sure you’re aligning it with the guides here: [PnP Application Registration](https://pnp.github.io/powershell/articles/registerapplication.html) and [Determine Permissions](https://pnp.github.io/powershell/articles/determinepermissions.html).
Did you create the app registration using PnP commands? I recall there are some configurations that might be missed when doing it manually. If not, try making a new app registration through PnP commands with the new client ID.
Nope, I made it manually in Entra, so that might explain some of the issues.
Make sure you've properly registered the app in Microsoft Entra ID. Double-check all the settings because missing even a small detail can lead to issues like this. Here's a step-by-step guide that might help: [o365reports.com Registration Guide](https://o365reports.com/2024/09/11/register-an-entra-id-application-to-use-with-pnp-powershell/)
Thanks for the tip! I did check the setup a bunch of times, and it worked consistently after about a hundred tries. So now I'm left wondering why it's so inconsistent.

I got the same timeout error mentioned earlier, which wasn’t detailed enough to report. I'm aware that I've been using the new app registration requirement, but I still miss the ease of -UseWebLogin for some tasks. The strange part is while running commands again, they finally finished quickly, but I can’t understand why it’s so unpredictable.