Forum Discussion
Michael Schau
May 18, 2017Copper Contributor
SiteProperties.NewUrl not working
Has anyone had any luck changing the SiteCollection url in SharePoint Online using CSOM? https://msdn.microsoft.com/en-us/library/office/microsoft.online.sharepoint.tenantadministration.siteprope...
Michael Schau
May 18, 2017Copper Contributor
It is the Tenant Admin context.
Eg. <myurl>-admin.sharepoint.com
May 18, 2017
Is this something new? So far this has not been supported...adding VesaJuvonen to comment on this
- Michael SchauMay 18, 2017Copper Contributor
Well, it was added to CSOM a year ago, so I just assumed it was supported by now.
https://dev.office.com/blogs/new-sharepoint-csom-version-released-for-Office-365-march-2016
The property also exists in the SharePoint Online documentation.
- DeletedMay 18, 2017
how do you build the context with creds etc?
a example of mine
SharePointService sharePointService = new SharePointService(); AuthenticationManager authenticationManager = new AuthenticationManager(); using ( ClientContext adminContext = authenticationManager.GetSharePointOnlineAuthenticatedContextTenant(Info.TenantAdminUri.AbsoluteUri, Info.UserName, Info.UserPassWord)) { adminContext.RequestTimeout = Timeout.Infinite; }
hope it helps
- Michael SchauMay 19, 2017Copper Contributor
I've tried both AppOnly context with full SiteCollection permissions and SharePointOnlineContext.
Neither works.
I can however create/delete sitecollections and change other properties, but NewUrl doesn't work. So I believe my context is ok.
Deleted you're saying that it works for you? My ServerLibraryVersion is 16.0.6511.1201.