Coming up following Error while connecting to site collection using PnpOnline. Please help.
Coming up following Error while connecting to site collection using PnpOnline. Please help.
Hi @sns1 ,
Per my test, I am not able to reproduce your issue in my end:
However I have found a similar thread for your reference:
Pnp error when connect-pnponline
As mentioned, you have to connect with Connect-PnPOnline -Url <url> -PnPManagementShell and then you will receive a code to enter on https://microsoft.com/devicelogin, where you will need to login with credentials for an account that must have the Application Admin role assigned to them in the Admin Center, and then you can consent to give PnP Management Shell access to your tenant.
After that, you should be able to login with Connect-PnPOnline -Url <url> again.
See this response https://github.com/pnp/sp-starter-kit/issues/436#issuecomment-694936145
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Hi Elsie Lu,
Although I followed instructions given by, I still see same error.
and also I was trying to add a name in the application admin role for for the respective account which is already global admin account, however name is not resolving. PFA. Please suggest further. 

@sns1 ,
Please check this blog for more information:
Solution: Due To A Configuration Change Made By Your Administrator While Connecting To SharePoint Online Tenant Using PnPjs
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
Hi Elsie Lu,
Thank you. It worked.
Hi @sns1 ,
Glad to hear that and if you think my suggestion is helpful, you could mark it as an answer. It will help others who meet the similar question in this forum. Also others will directly see the answer.
Thanks for your support and understanding. :)
5 people are following this question.