Whether you use SharePoint Online Management Shell to run the PowerShell?
Whether you have a proxy?
Please check the firewall is off and the network works well.
If you have an account secured with MFA, when using PnP PowerShell you have to use the weblogin option which shows a popup to support MFA.
Please use the below PnP powershell command:
Connect-PnPOnline -Url "https://contoso.sharepoint.com" -UseWebLogin
OR
Connect-PnPOnline -Url "https://contoso.sharepoint.com" -Interactive
Solution: Set up PowerShell proxy
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
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.
@sns
Due to the account secured with MFA, when using PnP PowerShell you must have to use Interactive parement which shows a popup to support MFA. You cannot use Credentials parameter.
Hi Emily Du,
I see the following error. Looks like every thing looks good but why creating list is failing and asking for proxy in spite of Site is connected to PNP
Hi Emily Du,
Did you have a chance to look in to my previous thread?
@sns
Please try below PowerShell.
Hi Emily Du,
I tried above, but still the same error pops up.
@sns
1.Please run below Powershell first to check whether can conncnt SharePoint Online.
2.Then run following PowerShell to create a list.
Hi Emily Du,
I tried to do as per your suggestion, but clearcachetoken parameter is not taking , please suggest here further
and I tried to remove that clear cache parameter, PFA
@sns
1.Try to run the PoweShell in the SharePoint Online Management shell not using Windows PowerShell ISE.
2.Try to use another account in the same computer to run the PowerShell, compare the result.
3.Try to use another account in the another computer to run the PowerShell, compare the result.
@sns
I am looking forward to your feedback if there is any update.
Please remember to update this thread if you have any progress.
Thank you for your understanding.
Hi Emily Du,
At all above 3 situations it is giving same error I mentioned in my first thread which is : The remote server returned error: (407) Proxy Authentication required.
What we can do further? Please suggest
Hi Emily Du,
Please ignore its working now, After I set up PowerShell proxy in my machine, thank u for your time and support.
@sns
Congratulations on solving this issue and thanks for sharing your solution.
Due to the Q&A community has had a background update since January, and currently the question author cannot accept their own answer.
So I have added you solution in my answer, please remember to accept it as answer.
It will do great help to those who meet the similar question in this forum.
Thanks again for your contribution.
Sign in to comment
Activity