Closed tmaestrini closed 4 years ago
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Hi! In order to create teams artifacts, we need to be able to authenticate you towards the Microsoft Graph. The only way we can do that is by the means of an access token, and the only way we can retrieve an access token is by means of you providing consent to an Azure application we created specifically for this reason. The way it works is as follows:
Connect-PnPOnline -PnPManagementShell -LaunchBrowser -Url https://<yoursite>.sharepoint.com
You only have to issue this command one time. You will see that a browser will pop up and you will be asked to provide consent to a certain number of rights we request. Notice that we -cannot- receive your credentials. They all stay on your end. Basically what happens is that a registration is added to the "Enterprise Applications" list in your Azure AD which states that users within your organization can use this application id to authenticate towards the Microsoft Graph and SharePoint.
Once this consent is in place you can connect as you used to do before with the -Credentials parameter as in your snippet above and things should start to work.
Additional info: what happens after you provided consent is the following:
Thank you, @erwinvanhunen. I also tried this before - without success. Even after your described way, the error is still the same:
I also deleted the consented application in Azure AD and tried to authenticate again - no success. Please also have a look at the highlighted section in the screenshot above; is this correct?
And just noticed the following fact: after having downgraded on July 2020 Release (aka 3.23.2007.0), the provisioning sequence runs like a charm!
@PaoloPia referring the screenshot of the error warning above: could that be a bug?
The way it works is as follows:
Connect-PnPOnline -PnPManagementShell -LaunchBrowser -Url https://<yoursite>.sharepoint.com
You only have to issue this command one time. You will see that a browser will pop up and you will be asked to provide consent to a certain number of rights we request.
Erwin,
I have followed this instruction but after I enter the code and manually provide my credentials, the browser does NOT pop up, so I am not asked to provide consent to the required rights. Are there any limitations that I need to be aware of? I have made sure that I am using the August 2020 Point Release which was supposed to fix things. What am I missing here?
@erwinvanhunen same behaviour to me as described by @acksoft since I've updated to August 2020 release...
@erwinvanhunen and @PaoloPia do you have any news or idea regarding this error?
Hi, Thanks for your feedback. We're digging into this issue and we will update you as soon as possible.
Hi, after digging into this issue, it looks like it is now fixed in DEV branch and with the upcoming monthly release of PnP Sites Core and PnP PowerShell, it should be fixed in the public release, too. Please, wait for the monthly release and try again. In case of any further problem, feel free to open another issue. Thanks for your comprehension.
Environment
[x] Office 365 / SharePoint Online [ ] SharePoint 2016 [ ] SharePoint 2013
Expected or Desired Behavior
I am trying to apply the following template:
Calling the provisioning engine for the script above using PnPPowerShell through
Apply-PnPTenantTemplate
:I want to create a team in Microsoft Teams and provision the connected SharePoint Site Collection accordingly.
Observed Behavior
I am always getting this error:
Steps to Reproduce
I tried to run this and other scripts on different tenants with different global admin credentials. The error shows up after today, having updated my SharePointPnPPowerShellOnline version on August 2020 Release.
I'd like to mention @PaoloPia if he had any idea for a suitable solution. Thanks for your support!