P
proWare Solutions GmbH
Guest
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:
app.UseActiveDirectoryFederationServicesBearerAuthentication(
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!
Cheers
Alex
Continue reading...
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:
app.UseActiveDirectoryFederationServicesBearerAuthentication(
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!
Cheers
Alex
Continue reading...