Hi
In my old project azure login was working but I have upgraded all the packages from abp suite and all things are working fine. Now azure login is not working it's redirecting back to login page after azure login.
To check this issue I have created a sample project from abp suite and just added the azure settings into host appsettings.json file and added below code in hostmodule.cs class.
private static void ConfigureAzureLogin(ServiceConfigurationContext context, IConfiguration configuration)
{
context.Services.AddAuthentication().AddOpenIdConnect("AzureOpenId", "Azure", options =>
{
options.Authority = "https://login.microsoftonline.com/" + 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.Events.OnTokenValidated = (async context =>
//{
// var debugIdentityPrincipal = context.Principal.Identity;
// var claimsFromOidcProvider = context.Principal.Claims.ToList();
//});
});
}
Now login button is coming, azure login screen is coming but after entring the credential it's redirecting to login page again. Not able to understand the reason because same code is working in ABP 4.1.1 version but it's not working in ABP 4.2.2. Please suggest me some solution for the same it's quite urgent.
Reference Link : https://community.abp.io/articles/how-to-setup-azure-active-directory-and-integrate-abp-angular-application-lyk87w5l
Thanks,
- ABP Framework version: v4.2.2
- UI type: Blazor
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): no
- Exception message and stack trace: not getting any error
- Steps to reproduce the issue: Create sample project and add azure settings into appsettings.json file under host project.
19 Answer(s)
-
0
hi
Can you check your application logs? it should contain some messages.
-
0
-
0
-
0
Hi
There is no change in configuration same code is working in ABP4.1.1. version and you will also face this issue. You can download sample project from site and add azure settings into .json file then you will get this issue.
Thanks,
-
0
https://zoom.us/j/97304828768?pwd=czI1aHJIZG9iSGo2OUY5aWRxeHhzQT09
-
0
It's showing me invalid meeting id.
-
0
Try agagin.
-
0
Still same invalid meeting id
-
0
hi @safi
You can host a meeting. I will join.
-
0
Hi
Please join here https://zoom.us/j/92794106923?pwd=MC9pOUZBNldueVBPNkcrYzVjckxPUT09
-
0
-
0
Hi
I don't have test credentials.
-
0
hi
Can you create a test user?
-
0
Hi
Created test user...please share your email id so that I can share.
-
0
liming.ma@volosoft.com
-
0
liming.ma@volosoft.com
just sent the mail
-
0
Hi
Going to provide you access now.
-
0
Request Id: c83fae52-a82a-41af-ba52-5cf120e4a200 Correlation Id: f7f25463-7b4f-47b5-b283-c897ae289947 Timestamp: 2021-03-17T11:50:14Z Message: AADSTS90072: User account 'test4844@outlook.com' from identity provider 'live.com' does not exist in tenant 'Adappt Limited' and cannot access the application 'ed6923ba-af15-4a10-ac56-20f1ba29cec0'(InternalDevelopment-WHOEIOS) in that tenant. The account needs to be added as an external user in the tenant first. Sign out and sign in again with a different Azure Active Directory user account
-
0
Hi
Issue is resolved now.
Thanks,