You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.
According the documentation, Get-PnPUserProfileProperty commandlet requires connection to the tenant admin website in order to make it work, so we assume that it works when connecting to tenant admin site even when using SharePoint app-only authentication.
Actual behavior
If the connection is created using AppId and AppSecret parameters (SharePoint app with AppPermissionRequest Scope="http://sharepoint/content/tenant" Right="FullControl"), the command still fails:
Get-PnPUserProfileProperty : Access denied. You do not have permission to perform this action or access this resource.
Thanks @md0725 for the comment, you just solved my problem similar to OP is/was having. As I'd left out the AllowAppOnlyPolicy attribute on the AppPermissionsRequests element. 👍
Reporting an Issue or Missing Feature
Issue or lack of detail in documentation (https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/get-pnpuserprofileproperty?view=sharepoint-ps)
Expected behavior
According the documentation, Get-PnPUserProfileProperty commandlet requires connection to the tenant admin website in order to make it work, so we assume that it works when connecting to tenant admin site even when using SharePoint app-only authentication.
Actual behavior
If the connection is created using AppId and AppSecret parameters (SharePoint app with AppPermissionRequest Scope="http://sharepoint/content/tenant" Right="FullControl"), the command still fails:
Steps to reproduce behavior
Which version of the PnP-PowerShell Cmdlets are you using?
What is the version of the Cmdlet module you are running?
2.26.1805.0
How did you install the PnP-PowerShell Cmdlets?
The text was updated successfully, but these errors were encountered: