Open Closed

Azure Active Directory > External Login > Register AbpUser #7821


User avatar
0
ihugo created
  • ABP Framework version: v8.2.0
  • UI Type: MVC
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no

Our solution uses Azure AD for user authentication and is using the following code:

`

AddOpenIdConnect("AzureOpenId", "SSO", options =>
                {
                    options.Authority = $"{configuration["AzureAd:Instance"]}{configuration["AzureAd:TenantId"]}/v2.0/";
                    options.ClientId = configuration["AzureAd:ClientId"];
                    options.ResponseType = OpenIdConnectResponseType.CodeIdToken;
                    options.CallbackPath = configuration["AzureAd:CallbackPath"];
                    options.ClientSecret = configuration["AzureAd:ClientSecret"];
                    options.RequireHttpsMetadata = false;
                    options.SaveTokens = true;
                    options.GetClaimsFromUserInfoEndpoint = true;
                    options.Scope.Add("email");

                    options.ClaimActions.MapJsonKey(ClaimTypes.NameIdentifier, "sub");
                });

When this process registers the user, I would like to fill in the rest of the AbpUsers details (Firstname, Lastname etc). Do I need to override the ExternalUserRegistration code or can it be achieved through configuration of the scopes?


1 Answer(s)
  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello,

    Please check similar issue https://abp.io/support/questions/5817/Register-user-from-AzureAD-with-additional-info

    Thanks

Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13