Checklist
Description
When registering Auth0ManagementClient on application startup
builder.Services.AddAuth0ManagementClient().AddManagementAccessToken();
When injecting IManagementApiClient, following exception is thrown
System.InvalidOperationException: A suitable constructor for type 'HttpClientManagementConnection' could not be located. A Typed client must provide a constructor taking a 'System.Net.Http.HttpClient' as a parameter. ---> System.InvalidOperationException: Multiple constructors accepting all given argument types have been found in type 'Auth0.ManagementApi.HttpClientManagementConnection'. There should only be one applicable constructor.
Issue appears to be related to additional constructor added to ManagementApiClient here
Reproduction
- Register IManagementApiClient with
builder.Services.AddAuth0ManagementClient().AddManagementAccessToken();
- Inject IManagementApiClient dependency
- Observe System.InvalidOperationException exception at runtime
Additional context
No response
auth0.net version
7.46.0
.NET version
8.0
Checklist
Description
When registering Auth0ManagementClient on application startup
builder.Services.AddAuth0ManagementClient().AddManagementAccessToken();When injecting IManagementApiClient, following exception is thrown
System.InvalidOperationException: A suitable constructor for type 'HttpClientManagementConnection' could not be located. A Typed client must provide a constructor taking a 'System.Net.Http.HttpClient' as a parameter. ---> System.InvalidOperationException: Multiple constructors accepting all given argument types have been found in type 'Auth0.ManagementApi.HttpClientManagementConnection'. There should only be one applicable constructor.Issue appears to be related to additional constructor added to ManagementApiClient here
Reproduction
builder.Services.AddAuth0ManagementClient().AddManagementAccessToken();Additional context
No response
auth0.net version
7.46.0
.NET version
8.0