Replies: 1 comment
-
First off: please obscure URLs to something like: https://mytenant-my.sharepoint.cn What version of pnp.powershell are you using? Have you followed the guidance for authentication? You are using legacy authentication, witch could be disabled on tenant. Try using -Interactive which also supports MFA Regarding the issue, are you sure you have a valid connection? Do you have access? hth |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I use pnp.powershell module to connect to Azure China Tenant rather than Global Tenant.
But I got Error with executing add-pnplistitem or get-pnplistitem after successfully use connect-pnponline to connect to an site.
Below for your reference.
PS C:\Windows\System32> Connect-PnPOnline -Url https://avenues-my.sharepoint.cn/personal/jeremy_liao_avenueschina_cn -UseWebLogin
WARNING: Consider using -Interactive instead, which provides better functionality. See the documentation at https://pnp.github.io/powershell/cmdlets/Connect-PnPOnline.html#interactive-login-for-multi-factor-authentication
PS C:\Windows\System32> get-pnplistItem -List Social
Get-PnPListItem: The remote server returned an error: (403) FORBIDDEN.
PS C:\Windows\System32> get-pnplistItem -List Documents
Get-PnPListItem: The remote server returned an error: (403) FORBIDDEN.
Beta Was this translation helpful? Give feedback.
All reactions