Replies: 3 comments 1 reply
-
Yes I think the Az issue was resolved in one of the recent builds by a complete rehaul of the assembly load patterns in the module. As for the error, have you tried adding the TenantAdminUrl when you connect as the error suggests? |
Beta Was this translation helpful? Give feedback.
-
If I use the TenantAdminUrl like suggested I get the below error... Am I doing something wrong? 2023-09-21T21:57:30Z [Error] ERROR: Parameter set cannot be resolved using the specified named parameters. One or more parameters issued cannot be used together or an insufficient number of parameters were provided. Exception :
|
Beta Was this translation helpful? Give feedback.
-
Hi @AndersRask, For some reason the Managed Identity doesn't allow Get-PnPTenantSite??? It has no issue with Get-PnPWeb
2023-09-23T05:36:44Z [Information] INFORMATION: ERROR PROVISIONING SITE: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I resently tried upgrading my PnP.Provisioning script to use PnP.Powershel v2 and Managed Identities... (I am starting to wish I hadn't)
I am getting a lot of 401 errors presumable because the Function App Managed Identity doesn't have access... BUT... I have followied the guidance provided by the PnP.Powershell community and it just doesn't work.
https://pnp.github.io/powershell/articles/azurefunctions.html
First of all this section is incorrect if you are using managed identities...
You need to have the following uncommented.
I have also granted access to the managed identity using the following script:
But I am still getting the following error when trying to connect using:
$Site = Get-PnPTenantSite -Identity $webUrl -Connection $webConnect
2023-09-21T04:20:50Z [Information] OUTPUT: Exception :
2023-09-21T04:20:50Z [Information] OUTPUT: Type : System.Management.Automation.PSInvalidOperationException
2023-09-21T04:20:50Z [Information] OUTPUT: ErrorRecord :
2023-09-21T04:20:50Z [Information] OUTPUT: Exception :
2023-09-21T04:20:50Z [Information] OUTPUT: Type : System.Management.Automation.ParentContainsErrorRecordException
2023-09-21T04:20:50Z [Information] OUTPUT: Message : Unable to connect to the SharePoint Online Admin Center at 'https://mytenant-admin.sharepoint.com' to run this cmdlet. Please ensure you pass in the correct Admin Center URL using Connect-PnPOnline -TenantAdminUrl and you have access to it. Error message: The remote server returned an error: (401) Unauthorized..
Any advice would be appreciated..
Beta Was this translation helpful? Give feedback.
All reactions