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?
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]
Get-SPOSite
for getting a site collection. – Akhoy Jul 19 '15 at 18:00