Azure / Azure/azure-functions-dotnet-worker

ServiceBusTrigger ignoring the DefaultAzureCredentialOptions set in DefaultAzureCredentials

Open
#2,382 9 comments 4 reactions 0 assignees View on GitHub
bug extensions: service-bus feature: identity
Dominant language
C#
Stars
466
Forks
215
Avg merge
3d 10h
Merged PRs (30d)
7

Description

### Description

My function app is developed using .NET 8 with isolated worker process. We have a service bus trigger function.

In my local development, i wanted to turn off managed identity based authentication and instead use either visual studio or visual studio credentials

I tried to turn off using the DI with the below code

```
services.AddAzureClients(clientBuilder =>
{
var options = new DefaultAzureCredentialOptions
{
ExcludeManagedIdentityCredential = true
};

clientBuilder.UseCredential(new DefaultAzureCredential(options));
});
```

But ServiceBus trigger is not using the above options and still tried to authenticate using managed identity credentials

Could you please let me how do we turn off Managed identity authentication for service bus trigger

The version am using for Microsoft.Azure.Functions.Worker.Extensions.ServiceBus is 5.17.0

### Steps to reproduce

Refer the description

Contributor guide

No contributing guide indexed for this repository

Research direction

The payload names no repository files, tests, or entry points. Start by reproducing the .NET 8 isolated-worker ServiceBus trigger with Microsoft.Azure.Functions.Worker.Extensions.ServiceBus 5.17.0 and the shown DefaultAzureCredentialOptions configuration; done means the trigger honors the managed-identity exclusion or the supported configuration path is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
authentication, backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.