Skip to content

Not able to override ICredentialsLoader #2564

@keegan-caruso

Description

@keegan-caruso

Microsoft.Identity.Web Library

Microsoft.Identity.Web.TokenAcquisition

Microsoft.Identity.Web version

2.15.3

Web app

Not Applicable

Web API

Not Applicable

Token cache serialization

Not Applicable

Description

TokenAcquisition ServiceCollectionExtensions is checking for ICredentialsLoader against ImplementationType. It either needs to check ICredentialsLoader against ServiceType or ImplemenationType against DefaultCredentialLoader

See:

https://github.com/AzureAD/microsoft-identity-web/blob/master/src/Microsoft.Identity.Web.TokenAcquisition/ServiceCollectionExtensions.cs#L48

Reproduction steps

  1. Register a custom ICredentialsLoader
  2. Try to use an API that uses the credentials loader

Error message

No response

Id Web logs

No response

Relevant code snippets

NA

Regression

No response

Expected behavior

The provided ICredentialsLoader is used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions