0

I need to distinguish between unique SharePoint Instances in my provider-hosted App. I used to determine them on the Host-Url like that:

initializeSharePoint(Request["SPHostUrl"]); // Interactions with a database which stores User Data dependent on the Host URL

But one SharePoint Instance may have several Site Collections like:

  • www.sharepoint.com
  • www.sharepoint.com/sites/dev
  • www.sharepoint.com/sites/wiki

Yet it is one SharePoint Instance and owns the same users. I deal with user data and if I distinguish the SharePoint on the Host-Url which is dependent on the used Site Collection, I will end up with duplicate data.

The app I'm working on should handle Users for each SharePoint Instance that connects to it separately.

How can I distinguish a SharePoint Instance unique and independent of Site Collections? Is there any Property which I can load by CSOM?

  • Each site collection stores it's own copy in the user information list, if you are pulling data from there, then you'd need to account for that and not retrieve people by ID, but by account or email address. If you are tapping into the User Profile Service, then you should always be getting a single user. It isn't really clear what you are doing so this is a bit vague. – Eric Alexander Feb 19 '15 at 18:21
  • @PirateEric I need to isolate SharePoint domains aswell. The app I'm working on should handle Users for each SharePoint Instance that connects to it seperately. I used the Host-URL of the SharePoint to differ them, but as explained above this does not work as expected :/ – Vinz Feb 23 '15 at 9:01

Your Answer

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

Browse other questions tagged or ask your own question.