saleem-mirza / serilog-sinks-azure-analytics

Serilog sink which writes to Azure analytics
Apache License 2.0
62 stars 45 forks source link

Managed Identity in Azure App Service support? #93

Open joakimlemb opened 6 months ago

joakimlemb commented 6 months ago

https://learn.microsoft.com/en-us/azure/app-service/overview-managed-identity?tabs=portal%2Cdotnet#connect-to-azure-services-in-app-code

Is "ClientSecret" the only type of EntraID authentication supported for the "vnext" branch?

From the example/docs at https://www.nuget.org/packages/Serilog.Sinks.AzureLogAnalytics/ I can't find any information about System/User managed Identity in Azure.

If it is supported, can the doc be updated with an example for Managed Identity?

ref current available settings for EntraID auth:

  "Serilog": {
    "Using": [ "Serilog.Sinks.AzureLogAnalytics" ],
    "MinimumLevel": "Verbose",
    "WriteTo": [
      {
        "Name": "AzureLogAnalytics",
        "Args": {
          "credentials": {
            "endpoint": "https://****.****.ingest.monitor.azure.com",
            "immutableId": "dcr-****",
            "streamName": "Custom-****_CL",
            "tenantId": "****-****-****-****-****",
            "clientId": "****-****-****-****-****",
            "clientSecret": "*******"
          },
          "configSettings": {
            "bufferSize": "5000",
            "batchSize": "100"
          }
        }
      }
    ]
  }
}