3

I have a site collection. https://rocket.sharepoint.com/sites/developing

I have tenant : https://rocket-admin.sharepoint.com

Now i want to get tenant URL using java script object modal from the site collection URL which is mention above.

Is there any method in SP.Web object to fetch the information of respective tenant?

Thanks.

4

SP.Web doesn't contain admin URL (tenant URL), but you can do this with a simple JavaScript split method:

var str = "https://rocket.sharepoint.com/sites/developing";
var res = str.split(".sharepoint.com");
var adminUrl = res[0] + "-admin.sharepoint.com";

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.