Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Set-PnPUserProfileProperty only allows already used values when setting SPS-Location #3693

Closed
2 of 6 tasks
jussihi opened this issue Jan 14, 2024 · 1 comment
Closed
2 of 6 tasks
Labels
bug Something isn't working

Comments

@jussihi
Copy link

jussihi commented Jan 14, 2024

Reporting an Issue or Missing Feature

When using Set-PnPUserProfileProperty, I can only add locations that are already some other user's location as users' locations (SPS-Location). Setting someone's location to something that has never been used before fails.

Expected behavior

I would expect Set-PnPUserProfileProperty to be able to introduce new locations as well. This is shown as first example of this very command, so I would expect it to work: https://pnp.github.io/powershell/cmdlets/Set-PnPUserProfileProperty.html#example-1

Actual behavior

PS > Set-PnPUserProfileProperty -Account 'user-1@mytenant.com' -Property 'SPS-Location' -Value 'Helsinki'
PS > Set-PnPUserProfileProperty -Account 'user-1@mytenant.com' -Property 'SPS-Location' -Value 'Vaasa'
Set-PnPUserProfileProperty: Nykyisen käyttäjän käyttöoikeudet eivät riitä tämän toiminnon suorittamiseen.

The error says something like "Current user's permissions are insufficient to complete this request".

Here in this example I have user-2@mytenant.com Office Location (SPS-Location) set to Helsinki manually. I can then choose this same location as user-1's location (as shown above), but I cannot change user-1's location to something that has never been set to anyone's location.

Steps to reproduce behavior

Above

What is the version of the Cmdlet module you are running?

2.3.0

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

Linux and Windows tested.

@jussihi jussihi added the bug Something isn't working label Jan 14, 2024
@gautamdsheth
Copy link
Collaborator

hi @jussihi , this a known issue, check this link #277 (comment)

Am going to close this as duplicate and related to the above linked issue.
Once that issue is resolved from Microsoft's side, this should start working for you. We don't have ETA on that, would suggest you to follow the linked issue for updates. Nothing we can do from our side here unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants