-
Notifications
You must be signed in to change notification settings - Fork 399
Description
Reporting an Issue or Missing Feature
I have just set up the new PnP.PowerShell cmdlets on my machine and when I try to set a value against a custom property, I get an error stating that I do not have rights. I am fully aware that similar issues have been raised on both the discussions and issues tabs but some are done against the previous versions of this PowerShell or deal in other aspects such as managed identities etc. Although this is something I would like to explore in the near future at this moment in time I just want to focus on the interactive connection.
Expected behavior
I expect the custom property to accept the new value that I want to set.
Actual behavior
I get the following error:
Set-PnPUserProfileProperty: This operation requires you to be managing your own data or have administrator privileges.
Steps to reproduce behavior
Following on from the instructions here using an account which has global administrator permissions:
https://pnp.github.io/powershell/articles/registerapplication.html
Register-PnPEntraIDAppForInteractiveLogin -ApplicationName "PnP.PowerShell" -Tenant <mytenant>.onmicrosoft.com
Connect-PnPOnline neoplasm.sharepoint.com -Interactive -ClientId 'my client id'
Set-PnPUserProfileProperty -Account 'account name' -PropertyName 'PropertyName' -Value 'SomeValue'
As the error message suggested that I could only manage my own data I tried adding the SharePoint and Graph permissions to application "User.ReadWrite.All" on the generated application. But still get the same error
message after re-connecting to the interactive session.
What is the version of the Cmdlet module you are running?
3.1.0
Which operating system/environment are you running PnP PowerShell on?
- Windows
Other information.
This custom attribute is fully editable within SharePoint Online.