This project is read-only.

Handle tenant in provider-hosted app for SharePoint

Apr 23, 2014 at 10:46 PM

What proper way to handle tenant in provider-hosted app for SharePoint? Can I use for this ClientContext.Web.Url (https://<tenant_name> or SharePointContextToken.TargetPrincipalName ?

Apr 25, 2014 at 8:07 AM
you should be using GetRealmFromTargetUrl method from TokenHelper to get the uniquely identifying tenant ID. URL option is not good in long run, if we will introduce possibility to change the tenant URL in future and this is known request from customers, so it could be something which we will enable in future.
Marked as answer by vesaj on 5/19/2014 at 10:42 AM