3

Is possible to get a users personal site information from this endpoint /_api/sp.userprofiles.peoplemanager/getpropertiesfor or by another means without having admin rights?

I need to be able to get a users personal site (OneDrive for Business Url), when I try with a non admin account I get 403

2 Answers 2

2

No you cannot use /_api/sp.userprofiles.peoplemanager/getpropertiesfor endpoint without admin rights. Please find more details here.

The other method which you can try is using search REST API. In that case you can use people search and get the results. The endpoint will be:

/_api/search/query?querytext='username'&sourceid='B09A7990-05EA-4AF9-81EF-EDFAB16C4E31'

Find more details here

2
  • Thanks, from what I can see when I've tested this, the personal site ie tenant-my.sharepoint.com/personal/… is not in the results
    – Webfort
    Commented Mar 3, 2016 at 10:30
  • True that. PersonImmersive is there.
    – Garima
    Commented Mar 3, 2016 at 11:01
0

After doing some more testing the following endpoint will work to get the personalSite: https://tenant-my.sharepoint.com/_api/sp.userprofiles.peoplemanager/getpropertiesfor(@v)?@v='i%3a0%23.f%7cmembership%7cuser%40tenant.onmicrosoft.com'

In Office 365 the user is a user non administration access.

This is for SharePoint Online.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.