I'm testing REST results in the browser with mixed results.

The following URL returns the expected result:


however the following URL returns an error:


I get the error code -1, Microsoft.SharePoint.Client.ResourceNotFoundException and error message Cannot find resource for the request sp.userprofiles.peoplemanager. Google doesn't offer up much for the errors. Fiddler responds with a 404 result. I've tried leaving the URL unencoded, tried with lower case sp.userprofiles.peoplemanager and getuserprofilepropertyfor with no luck whatsover. I have also tried other methods within sp.userprofiles.peoplemanager. What am I doing wrong?

  • 2
    You don't need to use the cross-domain library for user profile properties. User profile properties do not change across different sites, since the user profile service runs on its own web app. Just use the first url, the one that works.
    – wjervis
    Mar 27 '15 at 1:50
  • Thanks. I tried that originally and got a 403 Forbidden response. Since I can access it through the browser, I honestly assumed I needed to use the cross domain library. Calling ~/sites/site/_api/Web/GetUserById(id) without the cross domain library works fine. What kind of error should I see if I'm not using the cross domain library when I need to be? Mar 27 '15 at 2:01
  • 2
    Did you give the app read permissions to the user profiles? The 403 would indicate that.
    – wjervis
    Mar 27 '15 at 2:01
  • Oh my. I've been a giant idiot. Thank you so much. I have to wait for tenant admin approval to test but in all likelihood, you have found my problem. Mar 27 '15 at 2:04
  • Glad I can help.
    – wjervis
    Mar 27 '15 at 2:05

I just needed to grant the app read permissions to the user profiles.

  • 1
    Can you tell me what permission you set? I have granted my app "User Profiles (social)" access, but I am still getting the 404 "Cannot find resource for the request sp.userprofiles.peoplemanager" error.
    – Ray Hogan
    Jul 25 '16 at 17:03

How do you grant an app permissions to the user profiles? I am only a site admin, is that something you have to do at the server?
What would be the app? Is that the site collection url?

  • HI mate, may you please raise this as another question. Jul 2 '19 at 1:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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