top of page

Cloud Migration Replication fails with "401 - Client request has not been completed"

If you get the following error by using a delegated admin user on the customers tenant:

"Client request has not been completed because it lacks valid authentication credentials for the requested endpoint(url)."

You should read this post.


What's happening? Read the general process or phases you go through to migrate data from on-premises to online here:


I've been using IntegrationRuntime_5.41.8909.1

Local credentials on SQL are valid and tested. SQL Connection String is also fine!


This is how you connection string should look like:

Server=<server>;Initial Catalog=<database>;User Id=<user>;Password=<pw>;

The user should be a sql server user. It's recommended to use the sa user or you create your own.


You can check it on your sql server like this using powershell:

$connection = New-Object System.Data.SqlClient.SqlConnection
$connection.ConnectionString = "Server=<server>;Initial Catalog=<database>;User Id=<user>;Password=<pw>;"
$connection.Open();
$connection.Close();

Need help on troubleshooting?


Solution:

It does not work with an delegated admin account - even if that account got granted consent for cloud migration through page 40027.

I had to create a user on the customers tenant and assign a full bc user license - in that case a business central premium license.

It worked like a charm after repeating the cloud migration and using the new user.


Here is the full call stack:

Error message: Failed to prepare the systems for replication.The call to prepare servers failed. Run id='2fa85fef-be00-49a4-a0f8-f8dcb7528269', Name='msweua1602t64662185_BCLast_Preparation', ErrorMessage='Operation on target NotifyBusinessCentral failed: Invoking endpoint failed with HttpStatusCode - '401 : Unauthorized', message - 'Client request has not been completed because it lacks valid authentication credentials for the requested endpoint(url).''Internal session ID: 018d1a25-89fc-4eda-a3d7-39db1f87035aApplication Insights session ID: bcabf06c-fae8-44ae-8590-7a71a3fd31e2Client activity id: 79fb8a43-141e-4b5e-aba5-1bcb3372ee80Time stamp on error: 2024-06-05T18:09:35.5583917ZUser telemetry id: 7ce5c218-ad2f-48a1-9b58-7e5bc0d5f1c1

AL call stack: 
"Hybrid Deployment"(CodeUnit 6060).RetryGetStatus line 22 - Base Application by Microsoft
"Hybrid Deployment"(CodeUnit 6060).RetryGetStatus line 2 - Base Application by Microsoft
"Hybrid Deployment"(CodeUnit 6060).EnableReplication line 23 - Base Application by Microsoft
"Hybrid Cloud Management"(CodeUnit 4001).EnableReplication line 8 - Intelligent Cloud Base by Microsoft
"Hybrid Cloud Management"(CodeUnit 4001).HandleShowCompanySelectionStep line 8 - Intelligent Cloud Base by Microsoft
"Hybrid Cloud Setup Wizard"(Page 4000).ShowCompanySelectionStep line 5 - Intelligent Cloud Base by Microsoft
"Hybrid Cloud Setup Wizard"(Page 4000).NextStep line 40 - Intelligent Cloud Base by Microsoft
"Hybrid Cloud Setup Wizard"(Page 4000).NextStep line 30 - Intelligent Cloud Base by Microsoft
"Hybrid Cloud Setup Wizard"(Page 4000)."ActionNext - OnAction"(Trigger) line 35 - Intelligent Cloud Base by Microsoft

9 Ansichten0 Kommentare

Aktuelle Beiträge

Alle ansehen

The Line Type Myth

Comments


bottom of page