pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets
https://pnp.github.io/powershell
Other
989 stars 662 forks source link

Useweblogin > NewPnpSite > App-Only Error #2849

Open ZimmermannThomas opened 4 years ago

ZimmermannThomas commented 4 years ago

Reporting an Issue or Missing Feature

Today, I got a new laptop. On my old device I can connect with SharePointOnline via Connect-PnPOnline -Url https://tenant.sharepoint.com -UseWebLogin

then I can create new sites with New-PnPSite -Type TeamSite -Title "Test05" -Alias "T05" -Lcid 1031

On my new device I can connect as mentioned above. However, I get following error message

`New-PnPSite : App-Only is currently not supported, unless you provide a Microsoft Graph Access Token. In Zeile:1 Zeichen:1

Expected behavior

A new site should be created.

Actual behavior

Please find the error message above.

Which version of the PnP-PowerShell Cmdlets are you using?

What is the version of the Cmdlet module you are running?

3.24.2008.0

How did you install the PnP-PowerShell Cmdlets?

Can someone help me? I am losing my mind on this one...

Update 1: If I run Connect-PnPOnline -url https://tenant.sharepoint.com/sites/AN33 -Credentials (Get-Credential) I can create new sites. However, I would like to use the "useweblogin" in my scripts...

ghost commented 4 years ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

alexc-MSFT commented 4 years ago

I'm also having the same issue as @ZimmermannThomas and this has been reported as an issue with our request-a-team app too as the deployment script uses PnP PowerShell. (https://github.com/OfficeDev/microsoft-teams-apps-requestateam

ZimmermannThomas commented 4 years ago

@alexc-MSFT Thanks a lot. It is working again

Update: I have received an email with the request to explain the solution. It is quite easy just uninstall the current PnP-PowerShell module and install the version 3.23...:

`Uninstall-Module SharePointPnpPowerShellOnline

Install-Module -Name SharePointPnPPowerShellOnline -RequiredVersion 3.23.2007.1`

ZimmermannThomas commented 4 years ago

Hi,

yes of course. Just uninstall the current PnP-PowerShell module and install the version 3.23...:

`Uninstall-Module SharePointPnpPowerShellOnline

Install-Module -Name SharePointPnPPowerShellOnline -RequiredVersion 3.23.2007.1`

I updated my post on github.

On Tue, 18 Aug 2020 at 12:08, Anoop Tatti notifications@github.com wrote:

@ZimmermannThomas https://github.com/ZimmermannThomas - Can you please let us know how did you manage to get it working?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pnp/PnP-PowerShell/issues/2849#issuecomment-675389213, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANQBQZFPRWRWRAEAPULUHVDSBJHJLANCNFSM4QCC4OMA .