Giter Site home page Giter Site logo

MsalCacheHelper.CreateAsync throws MsalClientException when using an ADFS ClientId about microsoft-authentication-extensions-for-dotnet HOT 5 CLOSED

azuread avatar azuread commented on July 3, 2024
MsalCacheHelper.CreateAsync throws MsalClientException when using an ADFS ClientId

from microsoft-authentication-extensions-for-dotnet.

Comments (5)

bgavrilMS avatar bgavrilMS commented on July 3, 2024

The workaround mentioned here will ensure token caching works, however the event CacheChanged will not fire.

from microsoft-authentication-extensions-for-dotnet.

jmprieur avatar jmprieur commented on July 3, 2024

@bgavrilMS this is really an MSAL.NET issue? if the ADFS client ID needs to be a GUID, do we want to relax the constraint in MSAL.NET when we detect an ADFS authority?

from microsoft-authentication-extensions-for-dotnet.

bgavrilMS avatar bgavrilMS commented on July 3, 2024

@jmprieur - it's not an MSAL.NET issue, it is a cache extension issue.

from microsoft-authentication-extensions-for-dotnet.

bgavrilMS avatar bgavrilMS commented on July 3, 2024

As discussed offline - the cache needs to be able to read the accounts and only MSAL can do that. So the cache creates a PublicCLientApplication object with the given client ID, but this doesn't work for ADFS / other cloud authorities.

Solution would be for users to provide authority as well.

from microsoft-authentication-extensions-for-dotnet.

jmprieur avatar jmprieur commented on July 3, 2024

Todo:

  1. Add a new property Authority to StorageCreationPropertiesBuilder, which default value is the Azure public cloud authority
  2. Have MsalCacheHelper.GetAccountIdentifiersNoLockAsync use the authority when creating the public client application

from microsoft-authentication-extensions-for-dotnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.