0

i have a site collection called https://mysitedev.sharepoint.com/sites/migration is there anyway to get the first bit https://mysitedev.sharepoint.com with csom. will i have to do it with regex?

  • 1
    Those are two different site collections (just for clarification) – Robert Lindgren Jul 19 '15 at 10:57
  • yeah, they are in the same farm but are different site collections – daveyboy Jul 19 '15 at 11:43
  • Do you want to get the root site collection or the root web of the root site collection? Online shell contains Get-SPOSite for getting a site collection. – Akhoy Jul 19 '15 at 18:00
0

As per my knowledge you can not get the tenant site collection url directly.

You can get it by splitting the url by .(dot) and then concatenate firstPart [https://mydevsite] + secondPart [sharepoint] + thirdPart [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.