Getting Role Claims in Token RRS feed

  • Question

  • Hi!

    I have created a Web API Poject in VS2019 to be secured by ADFS.

    So VS created the following code in Startup.Auth.cs for me:

            new ActiveDirectoryFederationServicesBearerAuthenticationOptions
              MetadataEndpoint = ConfigurationManager.AppSettings["ida:AdfsMetadataEndpoint"],
              TokenValidationParameters = new TokenValidationParameters()
                ValidAudience = ConfigurationManager.AppSettings["ida:Audience"],
                ValidIssuer = ConfigurationManager.AppSettings["ida:Issuer"]

    I have also a React web application which uses the ADAL library to get the token and to call the Web API.

    In my ADFS server I have created an appilcation group and the React App is able to call the service.

    My problem is that I cannot pass any role claims to the service!

    Is there anyone who can tell my how to pass role claims? I tried configuring the application group entry on the web api side, but it didn't work.

    Any help appreciated!


    • Moved by CoolDadTx Tuesday, November 17, 2020 3:25 PM ASP.NET related
    Tuesday, November 17, 2020 2:07 PM

All replies

  • This forum is for C#-language questions. Please post questions related to ASP.NET in the ASP.NET forums.

    Michael Taylor http://www.michaeltaylorp3.net

    Tuesday, November 17, 2020 3:25 PM