“Invalid value for header \u0067x-ms-request-id\u0067. The header must contain a single valid GUID”
I was facing the issue “Invalid value for header \u0067x-ms-request-id\u0067. The header must contain a single valid GUID” while making request to the Azure Database Rest API to create database copy.
“Application Insights” installed in Asp.net core or Mvc application appends some extra header while making http requests. So Azure api throws the Bad request with the exception message specified and does not let to create the copy of database.
To resolve this issue, httpclient request dependency for the Azure rest api call on the azure Url https://management.azure.com needs to be removed.
For this you just need to modify the ApplicationInsights.config:
Under the <TelemetryModules> tag in the ApplicationInsights xml configuration, following the tag <Add Type="Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule,Microsoft.AI.DependencyCollector"> and then under <ExcludeComponentCorrelationHttpHeadersOnDomains>, you will be able to see some urls which are by default added in the list for excluding the correlation headers.
Here you will need to add the azure domain url for excluding the correlation headers as shown in screenshot below: