Coder Social home page Coder Social logo

Comments (4)

guobinC avatar guobinC commented on June 24, 2024

After set breakpoint to
notification.Response.Redirect("/Home/Error?message=" + notification.Exception.Message);

the detail error message is:

Unable to get authorization code Could not load file or assembly 'Microsoft.Identity.Client, Version=4.37.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040).

from active-directory-b2c-dotnet-webapp-and-webapi.

Turbo549 avatar Turbo549 commented on June 24, 2024

I issued pull request #119 to address this and to fix a problem that was occurring when your B2C policy names use mixed case and TasksController.AcquireTokenForScopes() calls were failing to silently acquire a token to access the sample API.

from active-directory-b2c-dotnet-webapp-and-webapi.

hercul1017 avatar hercul1017 commented on June 24, 2024

I had the same problem and adding "/tfp" to AadInstance parameter in web.config fixed it.

<add key="ida:AadInstance" value="https://parrotexamcom.b2clogin.com/tfp/{0}/{1}" />

I could login, however api call fails now.

Account always null, GetAccountAsync could not find any account in AcquireTokenForScopes method.

var account = await cca.GetAccountAsync(ClaimsPrincipal.Current.GetB2CMsalAccountIdentifier());

My user flows are named by using capital letters like B2C_1_SIGNUP_SIGNIN. Thanks to @Turbo549, by changing web.config values to lower case like b2c_1_signup_signin fixed the issue. Now the sample apps are working for me.

from active-directory-b2c-dotnet-webapp-and-webapi.

ganeshan avatar ganeshan commented on June 24, 2024

I can confirm that changing from B2C_1_SignupAndSignIn to b2c_1_signupandsignin in
<add key="ida:SignUpSignInPolicyId" value="b2c_1_signupandsignin" /> fixed the problem calling API. The whole sample works as expected.

from active-directory-b2c-dotnet-webapp-and-webapi.

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.