We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to connect with managed identity via Azure Automation Runbook (Powershell 7.2)
Add-PnPAzureADServicePrincipalAppRole -Principal "mymanagedidentity" -AppRole "Sites.FullControl.All" -BuiltInType SharePointOnline
Managed Identity also has the following rights:
Please describe what you see instead. Please provide samples of output or screenshots. (404) Unauthorized when using cmdlets.
Connect-PnPOnline returnconnection string:
ConnectionMethod : ManagedIdentity ConnectionType : O365 InitializationType : Unknown Scopes : PSCredential : ClientId : 31359c7f-bd7e-475c-86db-fdb8c937548e ClientSecret : ApplicationInsights : PnP.PowerShell.ALC.ApplicationInsights Url : https://mysite.sharepoint.com/sites/mysite TenantAdminUrl : Certificate : DeleteCertificateFromCacheOnDisconnect : False Context : PnP.Framework.PnPClientContext Tenant : UserAssignedManagedIdentityObjectId : UserAssignedManagedIdentityClientId : UserAssignedManagedIdentityAzureResourceId : AzureEnvironment : Production
Why is client id 31359c7f-bd7e-475c-86db-fdb8c937548e still shown when using managed identity?
I can connect "manually" on my device with my own account in powershell 7.5 using:
Connect-PnPOnline -Url "https://mysite.sharepoint.com/sites/mysite" -Interactive -ClientId "mymanagedidentity"
Return connection then shows the correct client ID.
Please include complete script or code samples in-line or linked from gists
try{ $connection = Connect-PnPOnline -Url $url -ManagedIdentity -ReturnConnection Write-Output "Connected to url: $($url)" Write-Output $connection }catch{ Write-Output "Connection failed." Write-Error $_ } try{ $web = Get-PnPSite -Connection $connection Write-Output "Connected to site: $($web.url)" }catch{ Write-Output "Get-PnPWeb failed." Write-Error $_ }
(you can retrieve this by executing Get-Module -Name "PnP.PowerShell" -ListAvailable) 2.12.0
Get-Module -Name "PnP.PowerShell" -ListAvailable
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Reporting an Issue or Missing Feature
Unable to connect with managed identity via Azure Automation Runbook (Powershell 7.2)
Add-PnPAzureADServicePrincipalAppRole -Principal "mymanagedidentity" -AppRole "Sites.FullControl.All" -BuiltInType SharePointOnline
Managed Identity also has the following rights:
Actual behavior
Please describe what you see instead. Please provide samples of output or screenshots.
(404) Unauthorized when using cmdlets.
Connect-PnPOnline returnconnection string:
Why is client id 31359c7f-bd7e-475c-86db-fdb8c937548e still shown when using managed identity?
I can connect "manually" on my device with my own account in powershell 7.5 using:
Connect-PnPOnline -Url "https://mysite.sharepoint.com/sites/mysite" -Interactive -ClientId "mymanagedidentity"
Return connection then shows the correct client ID.
Steps to reproduce behavior
Please include complete script or code samples in-line or linked from gists
What is the version of the Cmdlet module you are running?
(you can retrieve this by executing
Get-Module -Name "PnP.PowerShell" -ListAvailable
)2.12.0
Which operating system/environment are you running PnP PowerShell on?
The text was updated successfully, but these errors were encountered: