Set-PnPUserProfileProperty using Application Permissions

%3CLINGO-SUB%20id%3D%22lingo-sub-386859%22%20slang%3D%22en-US%22%3ESet-PnPUserProfileProperty%20using%20Application%20Permissions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-386859%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20followed%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FSharePoint%2FPnP-PowerShell%2Ftree%2Fmaster%2FSamples%2FSharePoint.ConnectUsingAppPermissions%2520%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ethis%20guide%3C%2FA%3E%20to%20connect%20to%20Sharepoint%20Online%20using%20Azure%20app%20permissions.%3C%2FP%3E%3CP%3ESo%20far%20so%20good%2C%20I%20can%20use%26nbsp%3BGet-PnPUserProfileProperty%20to%20read%20users%20their%20profile%20properties.%20But%20when%20I%20try%20to%20use%20Set-PnPUserProfileProperty%2C%20powershell%20throws%20an%20Access%20Denied%20error.%3C%2FP%3E%3CP%3EJust%20to%20test%2C%20I%20gave%20my%20app%20all%20permissions%20available%20under%20the%26nbsp%3BOffice%20365%20SharePoint%20Online%20API%20and%20I%20still%20get%20a%20permission%20error%20so%20I'm%20not%20sure%20what%20I'm%20doing%20wrong.%20Anyone%20an%20idea%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1229083%22%20slang%3D%22en-US%22%3ERe%3A%20Set-PnPUserProfileProperty%20using%20Application%20Permissions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1229083%22%20slang%3D%22en-US%22%3EHi%2C%3CBR%20%2F%3EI%20experienced%20the%20same%20and%20I%20had%20raised%20an%20issue.%20We%20have%20to%20wait%20for%20the%20reply%20from%20the%20respective%20person%20or%20any%20alternative.%20The%20below%20link%20is%20for%20your%20reference.%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoftDocs%2Foffice-docs-powershell%2Fissues%2F5074%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FMicrosoftDocs%2Foffice-docs-powershell%2Fissues%2F5074%3C%2FA%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Hello,

 

I followed this guide to connect to Sharepoint Online using Azure app permissions.

So far so good, I can use Get-PnPUserProfileProperty to read users their profile properties. But when I try to use Set-PnPUserProfileProperty, powershell throws an Access Denied error.

Just to test, I gave my app all permissions available under the Office 365 SharePoint Online API and I still get a permission error so I'm not sure what I'm doing wrong. Anyone an idea?

 

Thanks.

1 Reply
Highlighted
Hi,
I experienced the same and I had raised an issue. We have to wait for the reply from the respective person or any alternative. The below link is for your reference.
https://github.com/MicrosoftDocs/office-docs-powershell/issues/5074