2

I am trying to get a User Profile property that contains an URL for a SharePoint site, then I want to use this URL to get the site title using REST API.

Is it possible?

2

You can use below query to get the user profile property of current user

http://siteurl/_api/SP.UserProfiles.PeopleManager/GetMyProperties?$select=PropertyName

The next part is a bit tricky because of CROSS-DOMAIN issues. To read the sitetile of current web use below query

https://yoursite.sharepoint/_api/web/title

You can follow below link for cross domain web title

http://sundarnarasiman.net/?p=536

  • obviously it's working for SP2013 sites but not for SP2010, is there a way to make it work on Sharepoint 2010 site? – walsharepointer Nov 5 '14 at 16:38
  • You should use Webservice in that case. You can use ajax and query. Or ClientObject model. – Amal Hashim Nov 5 '14 at 16:42
  • Intresting, can you recommend me a tutorial or an article about this solution? – walsharepointer Nov 5 '14 at 16:50
  • Webservice ClientObjectModel – Amal Hashim Nov 5 '14 at 17:32

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.