This sample won't work if I use certificate as secret for my AAD app
See original GitHub issuePlease provide us with the following information:
This issue is for a: (mark with an x
)
- [ ] bug report -> please search issues before submitting
- [x] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
Minimal steps to reproduce
In appsetting.json file, instead of putting AAD app secret for “ClientSecret”, I put the Certificate Name. The sample won’t run because in the Startup.cs file, when the app first runs: services.AddAuthentication(AzureADDefaults.JwtBearerAuthenticationScheme) .AddAzureADBearer(options => Configuration.Bind(“AzureAd”, options));
.AddAzureADBearer() is taking AzureADOptions as input, and this class doesn’t have properties for certificate name. Thus, this sample is not supporting certificate as a secret for AAD app.
AzureADOptions class is from the package: Microsoft.AspNetCore.Authentication.AzureAD.UI.AzureADOptions
Any log messages given by the failure
Expected/desired behavior
Do I miss anything here? Or this sample will support certificate in the future?
OS and Version?
Windows 10.
Versions
Mention any other details that might be useful
Please let me know if I am missing anything here, maybe this sample does support the certificate as secret.
Thanks! We’ll be in touch soon.
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (5 by maintainers)
Top GitHub Comments
@shiweiwei114 : I’d like to come to this before the end of April. Meanwhile you can have a loot at this variation of the daemon sample: https://github.com/azure-samples/active-directory-dotnetcore-daemon-v2#variation-daemon-application-using-client-credentials-with-certificates. this will be similar.
This is now fixed. @shiweiwei114 @@amal-khalaf: See https://github.com/AzureAD/microsoft-identity-web/wiki/Using-certificates#decryption-certificates