Access Denied using App (Certificate) Authentication running Get-PnPUserProfileProperty #4898
Unanswered
salvatorik
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I registered an Azure App using certificate authentication to utilize the PnP module in PS7.
The certificate is stored locally in my "Personal" and "Trusted Root Certificate" stores.
I'm able to connect in PS7 using the cmdlet below (pre-populated variables):
Connect-PnPOnline -ClientId $ClientId -Url $AdminSiteUrl -Tenant $TenantID -Thumbprint $Thumbprint
I can run PnP cmdlets (i.e. Get-PnPSite, Get-PnPSiteCollectionAdmin, Get-PnPTenantSite).
It fails when using: Get-PnPUserProfileProperty -Account $UPN
Error is: "This application does not have the necessary permissions to access profile information".
Azure App Perms assigned include:
MS Graph -
Group.Read.All (Application)
Sites.FullControl.All (Delegated)
Sites.Read.All (Delegated)
Sites.Read.All (Application)
User.Read.All (Application)
User.Read (Delegated)
SharePoint -
Sites.FullControl.All (Application)
AllSites.FullControl (Delegated)
User.Read.All (Delegated)
Beta Was this translation helpful? Give feedback.
All reactions