question

sns1 avatar image
0 Votes"
sns1 asked ElsieLu-MSFT commented

Error while connecting to site colleciton using PnpOnline

Coming up following Error while connecting to site collection using PnpOnline. Please help.
127168-pserror.png


office-sharepoint-online
pserror.png (34.2 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ElsieLu-MSFT avatar image
0 Votes"
ElsieLu-MSFT answered sns1 converted comment to answer

Hi @sns1 ,

Per my test, I am not able to reproduce your issue in my end:
127390-46.jpg

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.


46.jpg (20.9 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

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.
127320-cv.png127368-cb.png


0 Votes 0 ·
cv.png (51.0 KiB)
cb.png (96.2 KiB)

@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.

1 Vote 1 ·
sns1 avatar image
0 Votes"
sns1 answered ElsieLu-MSFT commented

Hi Elsie Lu,

Thank you. It worked.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

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. :)

0 Votes 0 ·