Set-PnPUserProfileProperty with Application Permission in Azure Function

%3CLINGO-SUB%20id%3D%22lingo-sub-1229940%22%20slang%3D%22en-US%22%3ESet-PnPUserProfileProperty%20with%20Application%20Permission%20in%20Azure%20Function%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1229940%22%20slang%3D%22en-US%22%3E%3CP%3EWhen%20using%20%3CSTRONG%3ESet-PnPUserProfileProperty%3C%2FSTRONG%3E%20in%20Azure%20Function%20with%20Power%20Shell%20and%20the%20permissions%20has%20been%20defined%20using%20the%20%3CSTRONG%3EApplication%20Permission%3C%2FSTRONG%3E.%20Once%20connected%20to%20the%20admin%20site%20URL%20using%20client%20id%2C%20tenant%20and%20cert%20and%20try%20to%20update%20the%20User%20Profile%20Property%2C%20it%20throws%20the%20below%20error%3C%2FP%3E%3CP%3E%3CSTRONG%3EAccess%20denied.%20You%20do%20not%20have%20permission%20to%20perform%20this%20action%20or%20access%20this%20resource.%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EAttached%20the%20screenshot%20for%20the%20reference%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22PnP%20PS%20Issue.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F177077i0041996FAF058B3F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22PnP%20PS%20Issue.png%22%20alt%3D%22PnP%20PS%20Issue.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3BBelow%20are%20the%20permissions%20given%20for%20the%20application%20in%20Azure%20API%20Permissions%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22PnP%20PS%20Issue%20Permission%20List.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F177078i9321C3F4278337C7%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22PnP%20PS%20Issue%20Permission%20List.png%22%20alt%3D%22PnP%20PS%20Issue%20Permission%20List.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20someone%20already%20have%20a%20solution!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1229940%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Function%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPnP-PowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharepointOnline%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1230979%22%20slang%3D%22en-US%22%3ERe%3A%20Set-PnPUserProfileProperty%20with%20Application%20Permission%20in%20Azure%20Function%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1230979%22%20slang%3D%22en-US%22%3EHave%20exactly%20same%20issue%2C%20Module%20version%203.19.2003.0.%3CBR%20%2F%3ESet-PnPUserProfileProperty%20works%20without%20any%20issues.%3CBR%20%2F%3EApp%20has%20max%20possible%20permissions%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1231908%22%20slang%3D%22en-US%22%3ERe%3A%20Set-PnPUserProfileProperty%20with%20Application%20Permission%20in%20Azure%20Function%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1231908%22%20slang%3D%22en-US%22%3EHi%2C%3CBR%20%2F%3EI%20used%20the%20latest%20version%20and%20I%20am%20still%20receiving%20the%20same%20issue%2C%20I%20am%20not%20able%20to%20update%20the%20User%20Profile%20Property.%3C%2FLINGO-BODY%3E
Highlighted
Regular Contributor

When using Set-PnPUserProfileProperty in Azure Function with Power Shell and the permissions has been defined using the Application Permission. Once connected to the admin site URL using client id, tenant and cert and try to update the User Profile Property, it throws the below error

Access denied. You do not have permission to perform this action or access this resource.

Attached the screenshot for the reference

PnP PS Issue.png

 Below are the permissions given for the application in Azure API Permissions

PnP PS Issue Permission List.png

 

Hope someone already have a solution!

2 Replies
Highlighted
Have exactly same issue, Module version 3.19.2003.0.
Set-PnPUserProfileProperty works without any issues.
App has max possible permissions
Highlighted
Hi,
I used the latest version and I am still receiving the same issue, I am not able to update the User Profile Property.