Base solution for your next web application

Activities of "netaji.sapkal"

Dear Support,

With OpenID Connect New User is getting created but Profile Picture from Azure AD is not getting imported. Please implemet this ASAP

Thanks & Regards Netaji Sapkal

Hello Support, There is bug in below method in case Active Directory user Name doesn't have space in the Name property (claim) . please see the method GetUserInfo in OpenIdConnectAuthProviderApi class there is no check for  handling array as mentioned below. Please fix this ASAP. var fullNameParts = fullName.Split(' '); **Name = fullNameParts[0], **This line give error if AD User doesn't have Space

public override async Task<ExternalAuthUserInfo> GetUserInfo(string token)
{
    var issuer = ProviderInfo.AdditionalParams["Authority"];
    if (string.IsNullOrEmpty(issuer))
    {
        throw new ApplicationException("Authentication:OpenId:Issuer configuration is required.");
     }
    var configurationManager = new ConfigurationManager\<OpenIdConnectConfiguration>(
        issuer + "/.well-known/openid-configuration",
    new OpenIdConnectConfigurationRetriever(),
    new HttpDocumentRetriever());
    var validatedToken = await ValidateToken(token, issuer, configurationManager);
    var fullName = (c => c.Type == "name").Value;
    var email = validatedToken.Claims.First(c => c.Type == "unique_name").Value;
    var fullNameParts = fullName.Split(' ');
    
    return new ExternalAuthUserInfo
    {
        Provider = Name,
        ProviderKey = validatedToken.Subject,
        Name = fullNameParts[0],
        Surname = fullNameParts[1],
        EmailAddress = email
    };
}
Showing 1 to 2 of 2 entries