Hello @Angelos Petropoulos
if you want to connect to Azure Data Explorer using a Managed Identity in a web app, please try:
var cred = new DefaultAzureCredential();
var kcsbingest = new KustoConnectionStringBuilder(@"[cluster]")
.WithAadAzureTokenCredentialsAuthentication(cred);
You need to give the managed identity of your web app access to Azure Data Explorer first.
If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.