Closed sumanthreddy29 closed 9 months ago
I tired to make a change to the authentication logic by passing appID, secret and authority values. I was able to ingest successfully. Is it possible to add one more parameter that can use appid/appsecret to authenticate with kusto.
if (!string.IsNullOrWhiteSpace(m_args.ConnectWithManagedIdentity))
{
if (kcsb.FederatedSecurity || kcsb.DstsFederatedSecurity)
{
//kcsb.EmbeddedManagedIdentity = m_args.ConnectWithManagedIdentity;
kcsb.ApplicationClientId = m_args.ConnectWithManagedIdentity;
kcsb.ApplicationKey = "SECRET";
kcsb.Authority = "Authority";
}
else
{
throw new UtilsArgumentException($"Command line arguments error. 'ManagedIdentity' can only be used with federated authentication.", null);
}
}
Hi @sumanthreddy29, You can use App / Key or App Certificate authentication using the connection string. See: https://learn.microsoft.com/en-us/azure/data-explorer/kusto/api/connection-strings/kusto
As per the first issue, the errors suggests the managed identity you referred to is not assigned to your linux machine. 'ManagedIdentityCredential authentication unavailable. The requested identity has not been assigned to this resource.
Can you please double check that,
Hi @yogilad ,
Thanks for the suggestion. I tried using the App/ Key authentication using Kusto connection string and it worked. Thanks
Description: Using LightIngest Linux binary making a call with 1 files using managed Identity as authentication for Kusto. Unable to authenticate the kusto getting 400 bad request even though we provided valid clientID for managed identity
Reproduce: Authenticating LightIngest using managed identity LightIngest "https://ingest-xxxxx.eastus.kusto.windows.net;Fed=True" "-mi:{MANGED_IDENTITY}" -db:trips -table:test -source:"{STORAGE_URL};{STORAGE_KEY}" -pattern:"*.json" -format:json -ignoreFirst:false -cr:10.0 -dontWait:true
Error:
I tried to debug the code that is trying to form the ksuto connection string and the managed identity we send through parameters is assigned to EmbeddedManagedIdentity.
I looked into Kusto connection string builder code that uses embedded identity and it's in no longer in use.