Replies: 5 comments 11 replies
-
We have just tried this and are getting the same issue and error. Tested on many of the default OOTB properties too. |
Beta Was this translation helpful? Give feedback.
-
Everybody is currently waiting for a fix from Microsoft who are aware of this issue. |
Beta Was this translation helpful? Give feedback.
-
Hi all, yes it looks like there is a workaround before MS patched the problem. The only way is to connect differently to the service; |
Beta Was this translation helpful? Give feedback.
-
I am trying this with a Azure Automation account and a Azure Runbook. Im getting the same error message. Anyone with a fix for that? :) Set-PnPUserProfileProperty: Line | 5 | … erprofile = Set-PnPUserProfileProperty -Account "username@tenantdomain.com … | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | This operation requires you to be managing your own data or have administrator privileges.
|
Beta Was this translation helpful? Give feedback.
-
I haven’t used runbooks so I couldn’t say if you’re having an issue with passing the credentials, however the connect-pnponline command doesn’t work correctly for the set-pnpuserprofile command it’s a bug.
You must use
Connect-PnPOnline -S -Url $AdminSiteURL -Credentials $cred
From: Kjetil Ytrehus-Lynum ***@***.***>
Sent: May 9, 2023 6:12 AM
To: pnp/powershell ***@***.***>
Cc: Dan Charles ***@***.***>; Comment ***@***.***>
Subject: Re: [pnp/powershell] Set-PnPUserProfileProperty : This operation requires you to be managing your own data or have administrator privileges (Discussion #2155)
I am trying this with a Azure Automation account and a Azure Runbook. Im getting the same error message. Anyone with a fix for that? :)
Set-PnPUserProfileProperty: Line | 5 | … erprofile = Set-PnPUserProfileProperty -Account ***@***.******@***.***> … | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | This operation requires you to be managing your own data or have administrator privileges.
`Connect-PnPOnline https://tenant-admin.sharepoint.com/<https://tenant-admin.sharepoint.com/> -ManagedIdentity
$setuserprofile = Set-PnPUserProfileProperty -Account ***@***.******@***.***>" -PropertyName "Initials" -Value "asdafasdaf"`
—
Reply to this email directly, view it on GitHub<#2155 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AS7MSJZDMOPSMZKOVHS77QDXFI7CHANCNFSM6AAAAAARZKAG5E>.
You are receiving this because you commented.Message ID: ***@***.******@***.***>>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Found another issue #277 but my issue looks different in term of error message, so I am not sure if they are the same or different.
I have a cloud only account with active SPO Admin role,
To reproduce, run the following:
Connect-PnPOnline -Url https://my-tenant-admin-site.sharepoint.com -credential (get-credential)
Set-PnPUserProfileProperty -Account someone-else-in-my-org-upn -Property "custom-property-name" -Value "this is a single-line-of-text"
This custom user profile property is a string type of user profile property that is editable but hidden from users' Edit Profile screen.
And we received the following error:
Set-PnPUserProfileProperty : This operation requires you to be managing your own data or have administrator privileges.
At line:1 char:1
+ Set-PnPUserProfileProperty -Account xxx.yyy@zzz -Property ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (:) [Set-PnPUserProfileProperty], ServerException
+ FullyQualifiedErrorId : EXCEPTION,PnP.PowerShell.Commands.UserProfiles.SetUserProfileProperty
`
Beta Was this translation helpful? Give feedback.
All reactions