Replies: 3 comments 1 reply
-
Hi @Geo-Ron, |
Beta Was this translation helpful? Give feedback.
-
Any update on this? #277 is about to expire due to inactivity... |
Beta Was this translation helpful? Give feedback.
-
Here's an answer that promises to solve this issue; the only problem for me is that I still have the issue. But maybe it's a clue. Accessing SharePoint using an application context, also known as app-only says "User Profile CSOM write operations do not work with Azure AD application - read operations work. Both read and write operations work through SharePoint App-Only principal". Then Granting access using SharePoint App-Only gives instructions for setting that up. I was feeling pretty good when I found this, but then when I tested, still "Access denied. You do not have permission to perform this action or access this resource. Microsoft.SharePoint.Client.ServerUnauthorizedAccessException, ServerErrorCode : -2147024891, ServerErrorTypeName : System.UnauthorizedAccessException". Another possible clue is that Granting access using SharePoint App-Only shows -AppId and -AppSecret parameters for Connect-PnPOnline, but the current version (1.3.0?) doesn't provide those parameters, only -ClientId and -ClientSecret. Note, this all works for Get-PnPUserProfileProperty but not Set-PnPUserProfileProperty. Arrgh! |
Beta Was this translation helpful? Give feedback.
-
Hi all,
Version: 1.3.0 PNP.Powershell Manifest
I am trying to connect to Sharepoint using App (Certificate) Authentication.
This works, uploading files goes perfect.
Now I want to update the user Profile property and I receive an access denied.
Interactive logon works with my global admin account.
I ran the App registration as specified in the documentation with

Register-PnPAzureADApp -ApplicationName PnPRocks -Tenant mytenant.onmicrosoft.com -OutPath c:\mycertificates -DeviceLogin
Additionally granting permissions to the app.
Afterwards I ran
Register-PnPManagementShellAccess
and verified the permissions on this Enterprise App.But still can not get it to work.
Maybe related to #277 but I am unsure if I have followed the correct steps.
Any help would be greatly appreciated...
Beta Was this translation helpful? Give feedback.
All reactions