Migration API CreateMigrationJob failed for GCC azure storage
Category
- [x] Bug
Describe the bug
We use CreateMigrationJob to start migration job to import data to our sharepoint site, since auzre storage is govenment gcc, which endpoint suffix is "blob.core.usgovcloudapi.net", but it failed with could not resolve remote name "core.windows.net" which is global azure storage endpoint suffix.
Microsoft.WindowsAzure.Storage.StorageException: The remote name could not be resolved: 'spc.queue.core.windows.net' ---> System.Net.WebException: The remote name could not be resolved: 'spc.queue.core.windows.net'
We passed right azure storage container and queue uri, but this API failed to differentiate it.
Steps to reproduce
sample program
those are some filecontaineruri, packagecontaineruri and report queueuri sample we
/*
https://spc.blob.core.usgovcloudapi.net/migration-files1cfb064b-aa77-4bd7-b329-1b1e452c6365?sv=2015-02-21&sr=c&sig=Vdb9cSaAboMIMmRc5Ul94M6xkh1O/ybapNArRvtHJ0w=&se=2021-03-20T21:40:38Z&sp=rl
https://spc.blob.core.usgovcloudapi.net/cvspmigrationfiles111cfb064b-aa77-4bd7-b329-1b1e452c6365?sv=2015-02-21&sr=c&sig=JrXeDqmyhSbxKcVobXXqouSFZn+EbjMupSZFgsNqkTE=&se=2021-03-20T21:40:38Z&sp=rwl
https://spc.queue.core.usgovcloudapi.net/migrationqueue1cfb064b-aa77-4bd7-b329-1b1e452c6365?sv=2015-02-21&sig=MpoecpBitFJLjxRFbqD5vFdwwCepcYMoqp1wpEikbSw=&se=2021-03-20T21:40:38Z&sp=raup
*
*/
public void StartMigrationJob() { string office365UserName = ""; string offfice365Password = ""; string siteurl = ""; string fileContainerUri = ""; string packageContainerUri = ""; string reportingQueueUri = "";
try
{
SecureString sPassWord = new SecureString();
foreach (char c in offfice365Password.ToCharArray())
{
sPassWord.AppendChar(c);
}
ClientContext clientContext = new ClientContext(siteurl);
clientContext.Credentials = new SharePointOnlineCredentials(office365UserName, sPassWord);
Site m_site = clientContext.Site;
clientContext.Load(m_site);
clientContext.ExecuteQuery();
Web m_web = clientContext.Web;
clientContext.Load(m_web);
clientContext.ExecuteQuery();
m_site.CreateMigrationJob(m_web.Id, fileContainerUri, packageContainerUri, reportingQueueUri);
clientContext.ExecuteQuery();
}
catch(Exception ex)
{
Console.WriteLine(ex.Message);
}
}
}
Expected behavior
it should allow migration job created for gcc azure storage.
Environment details (development & target environment)
N\A
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Another customer via support reported the same issue. Is migration job supported in GCC tenant?
Thank you for taking the time to file an issue. We periodically archive older or inactive issues as part of our issue management process, which automatically closes them once they are archived.
If you’d like to understand more about why and how we handle archived (closed) issues, please see Our approach to closed issues.
We appreciate your contribution and if this is still an active issue with the latest SPFx versions, please do resubmit the details. We needed to perform a cleanup, so that we can start with a clean table with a new process. We apologize for the inconvenience this might cause.