3

I'm looking to validate a sharepoint online admin url, will this always be username-admin.sharepoint.com.

Would it be safe to say that if a url ends with -admin.sharepoint.com is valid admin site?

If not, is there another way?

6

A valid admin site in Office 365 is always https://tenant-admin.sharepoint.com

Tenant is the .onmicrosoft.com name that you choose when registering for a subscription.
Tenant Account Setup

Whether you choose a vanity domain, change the name of your public website, the admin url always remains: https://tenant-admin.sharepoint.com

0

The best way to validate the SharePoint Tenant Admin URL is using ConditionalScope Class

Example Code

using (ClientContext SPOClientContext = new ClientContext(SPOUrl))
{
 SPOClientContext.Credentials = new SharePointOnlineCredentials(SPOCredential.UserName, SPOCredential.Password);
 Tenant oTenant = new Tenant(SPOClientContext);
 ConditionalScope Scope = new ConditionalScope(SPOClientContext, () => oTenant.ServerObjectIsNull.Value != true);
 SPOClientContext.ExecuteQuery();
}

Reference: msdn

0

If any one else comes across this the sharepoint admin can also be the following https://tenant-admin.sharepoint.de

  • 1
    sharepoint.de is German cloud only – grisha Dec 18 '18 at 13:36

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.