Error when using app to update user profile properties in SharePoint Online
Symptoms
You use a Microsoft Entra app to update user profile properties in SharePoint Online by using app-only authentication. In this scenario, you receive System.UnauthorizedAccessException and the following error message:
Access denied. You do not have permission to perform this action or access this resource.
Cause
This issue occurs because the app doesn't have the required permissions to make the updates.
Resolution
To fix this issue, grant the User.ReadWrite.All permission to the app in the Azure portal. If you have to update taxonomic properties, also grant the TermStore.Readwrite.All
permission.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for