Errors with Azure AD Security (AccessToken is Null)

I've configured my app, and I'm adding Azure AD security to it. I've configured everything accounting to this page, but I'm getting errors in Blazor Studio after authenticating. I'd appreciate any assistance troubleshooting this.

info: Microsoft.IdentityModel.LoggingExtensions.IdentityLoggerAdapter[0]
IDX10242: Security token: '[PII of type 'Microsoft.IdentityModel.JsonWebTokens.JsonWebToken' is hidden. For more details, see Search - Microsoft Bing]' has a valid signature.
info: Microsoft.IdentityModel.LoggingExtensions.IdentityLoggerAdapter[0]
IDX10239: Lifetime of the token is valid.
info: Microsoft.IdentityModel.LoggingExtensions.IdentityLoggerAdapter[0]
IDX10234: Audience Validated.Audience: '83d54a06-aa21-4273-a946-adc871505978'
info: Microsoft.IdentityModel.LoggingExtensions.IdentityLoggerAdapter[0]
IDX10245: Creating claims identity from the validated token: '[PII of type 'Microsoft.IdentityModel.JsonWebTokens.JsonWebToken' is hidden. For more details, see Search - Microsoft Bing]'.
info: Microsoft.IdentityModel.LoggingExtensions.IdentityLoggerAdapter[0]
IDX21305: OpenIdConnectProtocolValidationContext.ProtocolMessage.Code is null, there is no 'code' in the OpenIdConnect Response to validate.
info: Microsoft.IdentityModel.LoggingExtensions.IdentityLoggerAdapter[0]
IDX21310: OpenIdConnectProtocolValidationContext.ProtocolMessage.AccessToken is null, there is no 'token' in the OpenIdConnect Response to validate.
info: System.Net.Http.HttpClient.AnnualInventory.LogicalHandler[100]
Start processing HTTP request POST https://localhost:5001/Account/CurrentUser
info: System.Net.Http.HttpClient.AnnualInventory.ClientHandler[100]
Sending HTTP request POST https://localhost:5001/Account/CurrentUser

Hi @Heather.Kent,

The pasted message doesn't seem to be an error. It looks as info logs created by the .NET framework.

Hi @korchev,

Thank you for your reply. :slight_smile:

I realize it's a .NET information message, but I cannot find any information on this error. I've configured Azure AD authentication according to the Radzen guide, and it will not authenticate, giving me the information I provided. I was hoping it was something someone had seen before so I could get some clues on how to get authentication working.

I guess I'll try creating another app in Entra and update the information in the security settings to see if it fixes the issue.

Thank you,

Heather

I don't see any error in the logs you have provided. Everything is prefixed with info. What is the actual problem that you have?

I'm sorry I didn't provide enough information. After logging into AD, the application tries to open multiple times, then comes back to a Microsoft account stating 'We couldn't sign you in. Please try again.'

image

If I'm unable to get this working, I'd like to know how to remove the security. I forgot to make a backup just before I enabled the security.

Thank you,

Heather

There isn't a built-in way (from Radzen Blazor Studio) to remove security. You should delete the generated code from Program.cs

Thank you. I'll try to do that. :slight_smile:

Heather