Closed Tran-Kien closed 6 years ago
Hi!
Unfortunately I'm not able to reproduce the issue you describe. Following the sequence of cmdlets you post in your screenshot succeeds for me without a problem.
I even took the template (some copy pasting errors I assume as some of the tags where missing) you posted and applied that succesfully to a site I just created.
Can you try to reproduce the error and then straight after that enter:
$error[0].Exception.Stacktrace
This will output the full stacktrace of where the error occured. Please post that stacktrace here so we can dive a bit deeper into what's going on on your end.
Regards,
/Erwin
Here is a screenshot of the entire template.
I would also like to bring to your attention that:
Thank you for this. I think I see where it goes wrong when looking at the code. I'll work on a fix.
Just for my confirmation: I assume you are not running the engine with an account that has tenant administration rights?
A fix for this issue has been merged through PR #1752
Thanks for looking into this. Yes, my account happens to be tenant admin as well.
If it can help, I remove myself from being part of the users selected for Targeted Release in my tenant with the same outcome (after waiting an hour for the change to take effect). So I think it is not related to being Targeted Release.
Interesting. Effectively was what was happening is that the engine would create a context towards the tenant administration site in order process any outstanding webapi approval requests. However, in your template where no such approvals defined. It nevertheless still builds a context towards the tenant admin site. And if you're not tenant admin, that's where it goes wrong. But in your case you are tenant admin, so that's puzzling.
@erwinvanhunen You need to look into newer versions because the error has come back. We have had a lot of trouble with this function. Tried to get it work in Runbook in azure with several versions. Luckily I had an older version locally that worked and when I tested to load that in the Automation account it worked. The version I got to work is: 3.13.1909.0 The latest in Azure didn't work. Neither 3.19.2003.0.
@erwinvanhunen
So I also have this problem, at first I got a message about a push notification not being enabled, for which the fix is to enable a feature Enable-PnPFeature -Identity '41e1d4bf-b1a2-47f7-ab80-d5d6cbba3092'
then I ran into this issue regarding the experimental problem. I'm running 3.24.2008.1 from an azure runbook.
The fix for me was that it only affected the first statement and it will work for the other statements.
I'm using the returnconnection on a site. I'm using an appID and secret to connect to the sites.
But this works:
Enable-PnPFeature -Identity '41e1d4bf-b1a2-47f7-ab80-d5d6cbba3092' -Connection $connectionSite
Apply-PnPProvisioningTemplate
It will fail on the first statement, but succesfully implement the Apply statement. If I just do the apply statement it will fail. It doesn't matter what the first statement is as long as it does something with the site. So a get doesn't do it. So the workaround for me is to just do this with the first command Enable-PnPFeature -Identity '41e1d4bf-b1a2-47f7-ab80-d5d6cbba3092' -Connection $connectionSite -ErrorAction Ignore
Category
[ X ] Bug [ ] Enhancement
Environment
[ X ] Office 365 / SharePoint Online [ ] SharePoint 2016 [ ] SharePoint 2013
Expected or Desired Behavior
Apply the blank provisioning template without error.
Observed Behavior
A PowerShell error when running Apply-PnPProvisioningTemplate.
"Apply-PnPProvisioningTemplate : The requested operation is part of an experimental feature that is not supported in the current environment."
Steps to Reproduce
Get the error above.
Here is the template:
<?xml version="1.0"?>