Might be related to https://abp.io/support/questions/9057/Angular-Lepton-403-You-are-not-authorized?
Currently, front-end packages are as follows:
{
"name": "PartnerPortal",
"version": "2.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve --open",
"build": "ng build",
"build:prod": "ng build --configuration production",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"lint": "ng lint"
},
"private": true,
"dependencies": {
"@abp/ng.components": "~10.0.0",
"@abp/ng.core": "~10.0.0",
"@abp/ng.oauth": "~10.0.0",
"@abp/ng.setting-management": "~10.0.0",
"@abp/ng.theme.shared": "~10.0.0",
"@angular-eslint/schematics": "^20.1.1",
"@angular/animations": "~20.0.0",
"@angular/cdk": "~20.0.0",
"@angular/common": "~20.0.0",
"@angular/compiler": "~20.0.0",
"@angular/core": "~20.0.0",
"@angular/forms": "~20.0.0",
"@angular/localize": "~20.0.0",
"@angular/platform-browser": "~20.0.0",
"@angular/platform-browser-dynamic": "~20.0.0",
"@angular/router": "~20.0.0",
"@fortawesome/fontawesome-free": "^5.0.0",
"@ng-bootstrap/ng-bootstrap": "^19.0.0",
"@ngx-translate/core": "^15.0.0",
"@ngx-translate/http-loader": "^6.0.0",
"@popperjs/core": "~2.11.0",
"@primeuix/styled": "^0.7.4",
"@primeuix/themes": "^1.2.5",
"@primeuix/utils": "^0.6.3",
"@swimlane/ngx-datatable": "^22.0.0",
"@tinymce/tinymce-angular": "^8.0.0",
"@types/bootstrap": "^5.2.10",
"@types/object-path": "^0.11.1",
"@types/prismjs": "^1.0.0",
"@volo/abp.commercial.ng.ui": "~10.0.0",
"@volo/abp.ng.account": "~10.0.0",
"@volo/abp.ng.audit-logging": "~10.0.0",
"@volo/abp.ng.file-management": "~10.0.0",
"@volo/abp.ng.identity": "~10.0.0",
"@volo/abp.ng.identity-server": "~10.0.0",
"@volo/abp.ng.language-management": "~10.0.0",
"@volo/abp.ng.saas": "~10.0.0",
"@volo/abp.ng.text-template-management": "~10.0.0",
"@volo/abp.ng.theme.lepton": "~10.0.0",
"angular-oauth2-oidc": "^16.0.0",
"angular-svg-icon": "^19.0.0",
"animate.css": "^4.1.1",
"apexcharts": "^3.27.2",
"bootstrap": "^5.3.8",
"bootstrap-icons": "^1.13.1",
"clipboard": "^2.0.8",
"dompurify": "^3.3.0",
"flag-icons": "^7.2.3",
"jquery": "^3.6.0",
"line-awesome": "^1.3.0",
"ng-apexcharts": "1.8.0",
"ng-zorro-antd": "~20.0.0",
"nouislider": "^15.2.0",
"object-path": "^0.11.5",
"primeng": "^20.3.0",
"prism-themes": "^1.8.0",
"prismjs": "^1.0.0",
"rxjs": "~7.8.0",
"socicon": "^3.0.0",
"tslib": "^2.7.0",
"typescript": "~5.8.0",
"zone.js": "~0.15.0"
},
"devDependencies": {
"@abp/ng.schematics": "~10.0.0",
"@angular-devkit/build-angular": "~20.0.0",
"@angular/compiler-cli": "~20.0.0",
"@angular/language-service": "~20.0.0",
"@types/jasmine": "~3.6.0",
"@types/node": "^12.0.0",
"eslint": "^7.32.0",
"jasmine-core": "~3.7.0",
"ng-packagr": "~20.0.0"
},
"overrides": {
"@swimlane/ngx-datatable": "^22.0.0"
}
}
Check the docs before asking a question: https://abp.io/docs/latest Check the samples to see the basic tasks: https://abp.io/docs/latest/samples The exact solution to your question may have been answered before, and please first use the search on the homepage.
Provide us with the following info:
🧐 Hint: If you are using the ABP Studio, you can see all the information about your solution from the configuration window, which opens when you right-click on the solution and click on the Solution Configuration button.
Did not upgrade to standalone components, updated app module to this:
import { CoreModule, provideAbpCore, withOptions } from '@abp/ng.core';
import { provideSettingManagementConfig, SettingManagementConfigModule } from '@abp/ng.setting-management/config';
import { provideAbpThemeShared, ThemeSharedModule } from '@abp/ng.theme.shared';
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { TranslateModule } from '@ngx-translate/core';
import { CommercialUiConfigModule, provideCommercialUiConfig } from '@volo/abp.commercial.ng.ui/config';
import { AccountAdminConfigModule, provideAccountAdminConfig } from '@volo/abp.ng.account/admin/config';
import { AccountPublicConfigModule, provideAccountPublicConfig } from '@volo/abp.ng.account/public/config';
import { AuditLoggingConfigModule, provideAuditLoggingConfig } from '@volo/abp.ng.audit-logging/config';
import { IdentityConfigModule, provideIdentityConfig } from '@volo/abp.ng.identity/config';
import { LanguageManagementConfigModule, provideLanguageManagementConfig } from '@volo/abp.ng.language-management/config';
import { registerLocale } from '@volo/abp.ng.language-management/locale';
import { provideSaasConfig, SaasConfigModule } from '@volo/abp.ng.saas/config';
import { provideTextTemplateManagementConfig, TextTemplateManagementConfigModule } from '@volo/abp.ng.text-template-management/config';
import { provideThemeLepton, ThemeLeptonModule } from '@volo/abp.ng.theme.lepton';
import { environment } from '../environments/environment';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { ApproveUserActionComponent } from './extentions/user/approve-user/approve-user-action.component';
import { AngularSvgIconModule } from 'angular-svg-icon';
import { MySettingsComponent } from './my-settings/my-settings.component';
import { provideAbpOAuth } from '@abp/ng.oauth';
import { providePrimeNG } from 'primeng/config';
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
import Aura from '@primeuix/themes/aura';
import { TitleStrategy } from '@angular/router';
import { CustomTitleStrategy } from './custom-title-strategy';
@NgModule({
declarations: [
AppComponent,
ApproveUserActionComponent,
MySettingsComponent,
],
imports: [
BrowserModule,
BrowserAnimationsModule,
AppRoutingModule,
CoreModule,
ThemeSharedModule,
AccountAdminConfigModule,
IdentityConfigModule,
TranslateModule.forRoot(),
SaasConfigModule,
AuditLoggingConfigModule,
SettingManagementConfigModule,
ThemeLeptonModule,
CommercialUiConfigModule,
NgbModule,
AngularSvgIconModule.forRoot(),
],
providers: [
ApproveUserActionComponent,
provideAbpCore(
withOptions({
environment,
registerLocaleFn: registerLocale(),
})
),
provideAbpOAuth(),
provideAnimationsAsync(),
providePrimeNG({
theme: {
preset: Aura
}
}),
provideAbpThemeShared(),
provideAccountPublicConfig(),
provideIdentityConfig(),
provideAccountAdminConfig(),
provideLanguageManagementConfig(),
provideTextTemplateManagementConfig(),
provideSettingManagementConfig(),
provideSaasConfig(),
provideAuditLoggingConfig(),
provideThemeLepton(),
provideCommercialUiConfig(),
{
provide: TitleStrategy,
useClass: CustomTitleStrategy,
},
],
bootstrap: [AppComponent],
})
export class AppModule { }
Exception message and full stack trace:
Steps to reproduce the issue: First error: When routes are guarded like this, the 403 error pops up on some pages, and on reload of any page even though I am logged in with admin role with all permissions.
{
path: 'contractorslist',
title: 'Partners',
loadChildren: () => import('./contractorslist/contractorslist.module').then(m => m.ContractorslistModule),
canActivate: [authGuard, permissionGuard],
data: {
requiredPolicy: 'PartnerPortal.Companies',
},
}
Second error: I updated checks on current user roles to *abpPermission directives, resulting in the "Cannot read properties of undefined (reading 'roles')" error.
<div *abpPermission="'PartnerPortal.Companies.GetAll'" class="menu-item">
<div class="menu-content pt-8 pb-2">
<span class="menu-section text-muted text-uppercase fs-8 ls-1">{{
'::Menu:PartnerOverview' | abpLocalization
}}</span>
</div>
</div>
<div *ngFor="let companyType of companyTypes" class="menu-item">
<a
*abpPermission="'PartnerPortal.Companies.GetAll'"
class="menu-link without-sub"
[routerLink]="['/admin/contractorslist', companyType.id]"
routerLinkActive="active"
>
<span class="menu-icon">
<svg-icon
[src]="'./assets/media/icons/duotune/ecommerce/ecm008.svg'"
class="svg-icon svg-icon-2"
></svg-icon>
</span>
<span class="menu-title">
{{ companyType.name }}
</span>
</a>
</div>
Application.Contracts project file:
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="....\common.props" />
<PropertyGroup> <TargetFramework>net8.0</TargetFramework> <RootNamespace>PartnerPortal</RootNamespace> </PropertyGroup>
<ItemGroup> <ProjectReference Include="..\PartnerPortal.Domain.Shared\PartnerPortal.Domain.Shared.csproj" /> </ItemGroup>
<ItemGroup> <PackageReference Include="AspNetCore.HealthChecks.UI" Version="8.0.1" /> <PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="8.0.1" /> <PackageReference Include="AspNetCore.HealthChecks.UI.InMemory.Storage" Version="8.0.1" /> <PackageReference Include="Azure.Storage.Blobs" Version="12.21.2" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="8.0.0" /> <PackageReference Include="Volo.Abp.Account.Pro.Admin.Application.Contracts" Version="8.2.2" /> <PackageReference Include="Volo.Abp.Account.Pro.Public.Application.Contracts" Version="8.2.2" /> <PackageReference Include="Volo.Abp.Account.Pro.Shared.Application.Contracts" Version="8.2.2" /> <PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="8.2.2" /> <PackageReference Include="Volo.Abp.Localization" Version="8.2.2" /> <PackageReference Include="Volo.Abp.Localization.Abstractions" Version="8.2.2" /> <PackageReference Include="Volo.Abp.PermissionManagement.Application.Contracts" Version="8.2.2" /> <PackageReference Include="Volo.Abp.FeatureManagement.Application.Contracts" Version="8.2.2" /> <PackageReference Include="Volo.Abp.SettingManagement.Application.Contracts" Version="8.2.2" /> <PackageReference Include="Volo.FileManagement.Application.Contracts" Version="8.2.2" /> <PackageReference Include="Volo.Saas.Host.Application.Contracts" Version="8.2.2" /> <PackageReference Include="Volo.Abp.AuditLogging.Application.Contracts" Version="8.2.2" /> <PackageReference Include="Volo.Abp.OpenIddict.Pro.Application.Contracts" Version="8.2.2" /> <PackageReference Include="Volo.Abp.LanguageManagement.Application.Contracts" Version="8.2.2" /> <PackageReference Include="Volo.Abp.TextTemplateManagement.Application.Contracts" Version="8.2.2" /> <PackageReference Include="Volo.Abp.LeptonTheme.Management.Application.Contracts" Version="8.2.2" /> </ItemGroup> </Project>
Domain.Shared project file: <Project Sdk="Microsoft.NET.Sdk">
<Import Project="....\common.props" />
<PropertyGroup> <TargetFramework>net8.0</TargetFramework> <RootNamespace>PartnerPortal</RootNamespace> <GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest> </PropertyGroup>
<ItemGroup> <PackageReference Include="Azure.Storage.Blobs" Version="12.11.0" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="8.0.0" /> <PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="8.2.2" /> <PackageReference Include="Volo.Abp.OpenIddict.Pro.Domain.Shared" Version="8.2.2" /> <PackageReference Include="Volo.Abp.BackgroundJobs.Domain.Shared" Version="8.2.2" /> <PackageReference Include="Volo.Abp.AuditLogging.Domain.Shared" Version="8.2.2" /> <PackageReference Include="Volo.Abp.FeatureManagement.Domain.Shared" Version="8.2.2" /> <PackageReference Include="Volo.Abp.Localization" Version="8.2.2" /> <PackageReference Include="Volo.Abp.Localization.Abstractions" Version="8.2.2" /> <PackageReference Include="Volo.Abp.PermissionManagement.Domain.Shared" Version="8.2.2" /> <PackageReference Include="Volo.Abp.SettingManagement.Domain.Shared" Version="8.2.2" /> <PackageReference Include="Volo.Abp.BlobStoring.Database.Domain.Shared" Version="8.2.2" /> <PackageReference Include="Volo.Abp.Identity.Pro.Domain.Shared" Version="8.2.2" /> <PackageReference Include="Volo.Abp.LanguageManagement.Domain.Shared" Version="8.2.2" /> <PackageReference Include="Volo.FileManagement.Domain.Shared" Version="8.2.2" /> <PackageReference Include="Volo.Saas.Domain.Shared" Version="8.2.2" /> <PackageReference Include="Volo.Abp.TextTemplateManagement.Domain.Shared" Version="8.2.2" /> <PackageReference Include="Volo.Abp.LeptonTheme.Management.Domain.Shared" Version="8.2.2" /> <PackageReference Include="Volo.Abp.GlobalFeatures" Version="8.2.2" /> </ItemGroup>
<ItemGroup> <EmbeddedResource Include="Localization\PartnerPortal*.json" /> <Content Remove="Localization\PartnerPortal*.json" /> </ItemGroup>
</Project>
Domain project file: <Project Sdk="Microsoft.NET.Sdk">
<Import Project="....\common.props" />
<PropertyGroup> <TargetFramework>net8.0</TargetFramework> <RootNamespace>PartnerPortal</RootNamespace> </PropertyGroup>
<ItemGroup> <ProjectReference Include="..\PartnerPortal.Domain.Shared\PartnerPortal.Domain.Shared.csproj" /> </ItemGroup>
<ItemGroup> <PackageReference Include="Azure.Storage.Blobs" Version="12.11.0" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="8.0.0" /> <PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="8.2.2" /> <PackageReference Include="Volo.Abp.Emailing" Version="8.2.2" /> <PackageReference Include="Volo.Abp.Localization" Version="8.2.2" /> <PackageReference Include="Volo.Abp.Localization.Abstractions" Version="8.2.2" /> <PackageReference Include="Volo.Abp.PermissionManagement.Domain.Identity" Version="8.2.2" /> <PackageReference Include="Volo.Abp.OpenIddict.Pro.Domain" Version="8.2.2" /> <PackageReference Include="Volo.Abp.PermissionManagement.Domain.OpenIddict" Version="8.2.2" /> <PackageReference Include="Volo.Abp.BackgroundJobs.Domain" Version="8.2.2" /> <PackageReference Include="Volo.Abp.AuditLogging.Domain" Version="8.2.2" /> <PackageReference Include="Volo.Abp.FeatureManagement.Domain" Version="8.2.2" /> <PackageReference Include="Volo.Abp.SettingManagement.Domain" Version="8.2.2" /> <PackageReference Include="Volo.Abp.BlobStoring.Database.Domain" Version="8.2.2" /> <PackageReference Include="Volo.Abp.Identity.Pro.Domain" Version="8.2.2" /> <PackageReference Include="Volo.Abp.LanguageManagement.Domain" Version="8.2.2" /> <PackageReference Include="Volo.Abp.LeptonTheme.Management.Domain" Version="8.2.2" /> <PackageReference Include="Volo.FileManagement.Domain" Version="8.2.2" /> <PackageReference Include="Volo.Saas.Domain" Version="8.2.2" /> <PackageReference Include="Volo.Abp.TextTemplateManagement.Domain" Version="8.2.2" /> <PackageReference Include="Volo.Abp.Commercial.SuiteTemplates" Version="8.2.2" /> </ItemGroup>
</Project>
Application project file: <Project Sdk="Microsoft.NET.Sdk">
<Import Project="....\common.props" />
<PropertyGroup> <TargetFramework>net8.0</TargetFramework> <RootNamespace>PartnerPortal</RootNamespace> </PropertyGroup>
<ItemGroup> <ProjectReference Include="..\PartnerPortal.Domain\PartnerPortal.Domain.csproj" /> <ProjectReference Include="..\PartnerPortal.Application.Contracts\PartnerPortal.Application.Contracts.csproj" /> </ItemGroup>
<ItemGroup> <PackageReference Include="Volo.Abp.Account.Pro.Shared.Application" Version="8.2.2" /> <PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="8.2.2" /> <PackageReference Include="Azure.Storage.Blobs" Version="12.21.2" /> <PackageReference Include="Volo.FileManagement.Application" Version="8.2.2" /> <PackageReference Include="Volo.Abp.LeptonTheme.Management.Application" Version="8.2.2" /> <PackageReference Include="Volo.Abp.PermissionManagement.Application" Version="8.2.2" /> <PackageReference Include="Volo.Abp.FeatureManagement.Application" Version="8.2.2" /> <PackageReference Include="Volo.Abp.SettingManagement.Application" Version="8.2.2" /> <PackageReference Include="Volo.Abp.Account.Pro.Public.Application" Version="8.2.2" /> <PackageReference Include="Volo.Abp.Account.Pro.Admin.Application" Version="8.2.2" /> <PackageReference Include="Volo.Abp.Identity.Pro.Application" Version="8.2.2" /> <PackageReference Include="Volo.Saas.Host.Application" Version="8.2.2" /> <PackageReference Include="Volo.Abp.AuditLogging.Application" Version="8.2.2" /> <PackageReference Include="Volo.Abp.OpenIddict.Pro.Application" Version="8.2.2" /> <PackageReference Include="Volo.Abp.LanguageManagement.Application" Version="8.2.2" /> <PackageReference Include="Volo.Abp.TextTemplateManagement.Application" Version="8.2.2" /> </ItemGroup>
</Project>
ABP Framework version: v8.2.2
UI Type: Angular
Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..)
Tiered (for MVC) or Auth Server Separated (for Angular): no
Exception message and full stack trace: C:\hostedtoolcache\windows\dotnet\dotnet.exe build D:\a\1\s\src\Volo.Abp.Account.Pro.Admin.Application.Contracts\Volo.Abp.Account.Pro.Admin.Application.Contracts.csproj "-dl:CentralLogger,"D:\a_tasks\DotNetCoreCLI_5541a522-603c-47ad-91fc-a4b1d163081b\2.247.3\dotnet-build-helpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll"*ForwardingLogger,"D:\a_tasks\DotNetCoreCLI_5541a522-603c-47ad-91fc-a4b1d163081b\2.247.3\dotnet-build-helpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll"" --configuration Release Determining projects to restore... ##[error]src\Volo.Abp.Account.Pro.Admin.Application.Contracts\Volo.Abp.Account.Pro.Admin.Application.Contracts.csproj(0,0): Error NU1605: Warning As Error: Detected package downgrade: Microsoft.Extensions.FileProviders.Embedded from 8.0.4 to 6.0.0. Reference the package directly from the project to select a different version. Volo.Abp.Account.Pro.Admin.Application.Contracts -> Volo.Abp.Account.Pro.Shared.Application.Contracts -> Volo.Abp.Identity.Pro.Application.Contracts 8.2.2 -> Volo.Abp.Identity.Pro.Domain.Shared 8.2.2 -> Microsoft.Extensions.FileProviders.Embedded (>= 8.0.4) Volo.Abp.Account.Pro.Admin.Application.Contracts -> Volo.Abp.Account.Pro.Shared.Application.Contracts -> Microsoft.Extensions.FileProviders.Embedded (>= 6.0.0) D:\a\1\s\src\Volo.Abp.Account.Pro.Admin.Application.Contracts\Volo.Abp.Account.Pro.Admin.Application.Contracts.csproj : error NU1605: Warning As Error: Detected package downgrade: Microsoft.Extensions.FileProviders.Embedded from 8.0.4 to 6.0.0. Reference the package directly from the project to select a different version. D:\a\1\s\src\Volo.Abp.Account.Pro.Admin.Application.Contracts\Volo.Abp.Account.Pro.Admin.Application.Contracts.csproj : error NU1605: Volo.Abp.Account.Pro.Admin.Application.Contracts -> Volo.Abp.Account.Pro.Shared.Application.Contracts -> Volo.Abp.Identity.Pro.Application.Contracts 8.2.2 -> Volo.Abp.Identity.Pro.Domain.Shared 8.2.2 -> Microsoft.Extensions.FileProviders.Embedded (>= 8.0.4) D:\a\1\s\src\Volo.Abp.Account.Pro.Admin.Application.Contracts\Volo.Abp.Account.Pro.Admin.Application.Contracts.csproj : error NU1605: Volo.Abp.Account.Pro.Admin.Application.Contracts -> Volo.Abp.Account.Pro.Shared.Application.Contracts -> Microsoft.Extensions.FileProviders.Embedded (>= 6.0.0)
Steps to reproduce the issue:
Pipeline yaml:
job: Job_Build_Host steps: - task: UseDotNet@2 displayName: "Use .NET Core sdk 8.x" inputs: version: 8.x
- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: "build"
projects: "**/*.csproj"
arguments: "--configuration Release"
workingDirectory: "$(System.DefaultWorkingDirectory)/aspnet-core"
I updated the TenantActivationState to Active, yet I still receive the same error.
The documentation you provided states that the QueryStringTenantResolveContributor is provided and configured by default.
I have included the login page url earlier, but the selectedTenantId query parameter is url encoded in the "returnUrl" query parameter for the login page.
Is there some authentication flow step I am missing where the tenant could be set on that login page? I would expect the selectedTenantId to be transitive.
Thanks maliming for pointing me back in the right direction.
I am currently continuing to debug my migrated project.
We have a landing page where we select a tenant, and then we redirect to the localhost:44385/Account/Login page.
Even though there is a "selectedTenant" query parameter, the tenant is not selected.
https://localhost:44385/Account/Login?ReturnUrl=%2Fconnect%2Fauthorize%3Fresponse_type%3Dcode%26client_id%3DPartnerPortal_App%26state%3DTEhmVEhYSG9sWjItV3VrRGd4b0M5dHRwOHBTdGYwRlFvWXZPRlJtNnNPZFFC%26redirect_uri%3Dhttp%253A%252F%252Flocalhost%253A4200%26scope%3Doffline_access%2520openid%2520profile%2520email%2520phone%2520PartnerPortal%26code_challenge%3D41hJzeacuRZcj0DOHNxFG_HW4pzZqQbpTfXL4ntrq3k%26code_challenge_method%3DS256%26nonce%3DTEhmVEhYSG9sWjItV3VrRGd4b0M5dHRwOHBTdGYwRlFvWXZPRlJtNnNPZFFC%26culture%3Den%26ui-culture%3Den%26selectedTenantId%3D7a50f0a8-38e8-0807-55b4-3a040dbaffd1
I have followed the commercial openiddict step by step migration guide (moving from IdentityServer to OpenIddict), as well as the angular part (which was just adding a trailing slash and an additional scope in the environment.ts file if I'm not mistaken). I did use the 8.2.2 versions of the packages.
I now receive this error in the browser after logging in.
error:invalid_scope
error_description:The specified 'scope' is invalid.
error_uri:https://documentation.openiddict.com/errors/ID2052
HttpApi.Host logs:
[15:41:20 INF] The request URI matched a server endpoint: Authorization.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessRequestContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+InferEndpointType.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessRequestContext was successfully processed by Volo.Abp.Account.Web.Pages.Account.OpenIddictImpersonateInferEndpointType.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessRequestContext was successfully processed by OpenIddict.Server.AspNetCore.OpenIddictServerAspNetCoreHandlers+ValidateHostHeader.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ExtractAuthorizationRequestContext was successfully processed by OpenIddict.Server.AspNetCore.OpenIddictServerAspNetCoreHandlers+ExtractGetOrPostRequest`1[[OpenIddict.Server.OpenIddictServerEvents+ExtractAuthorizationRequestContext, OpenIddict.Server, Version=5.5.0.0, Culture=neutral, PublicKeyToken=35a561290d20de2f]].
[15:41:20 INF] The authorization request was successfully extracted: {
"response_type": "code",
"client_id": "PartnerPortal_App",
"state": "fn5JeHpuN1Q4c2tLVWt2Yn51UnZTcGRvZEJzZWJCekpVZkI1Z0E1dE5XYUlW",
"redirect_uri": "http://localhost:4200",
"scope": "offline_access openid profile role email phone PartnerPortal",
"code_challenge": "CfsYjxje98KAV6DELm4BsKByagBqTSzjrJnIpXAEBJQ",
"code_challenge_method": "S256",
"nonce": "fn5JeHpuN1Q4c2tLVWt2Yn51UnZTcGRvZEJzZWJCekpVZkI1Z0E1dE5XYUlW",
"culture": "en",
"ui-culture": "en",
"selectedTenantId": "7a50f0a8-38e8-0807-55b4-3a040dbaffd1"
}.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessRequestContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+Authentication+ExtractAuthorizationRequest.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ValidateAuthorizationRequestContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+Authentication+ValidateRequestParameter.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ValidateAuthorizationRequestContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+Authentication+ValidateRequestUriParameter.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ValidateAuthorizationRequestContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+Authentication+ValidateClientIdParameter.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ValidateAuthorizationRequestContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+Authentication+ValidateRedirectUriParameter.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ValidateAuthorizationRequestContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+Authentication+ValidateResponseTypeParameter.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ValidateAuthorizationRequestContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+Authentication+ValidateResponseModeParameter.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ValidateAuthorizationRequestContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+Authentication+ValidateScopeParameter.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ValidateAuthorizationRequestContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+Authentication+ValidateNonceParameter.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ValidateAuthorizationRequestContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+Authentication+ValidatePromptParameter.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ValidateAuthorizationRequestContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+Authentication+ValidateProofKeyForCodeExchangeParameters.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessAuthenticationContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+ValidateAuthenticationDemand.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessAuthenticationContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+EvaluateValidatedTokens.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessAuthenticationContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+ResolveValidatedTokens.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessAuthenticationContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+ValidateRequiredTokens.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessAuthenticationContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+ValidateClientId.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessAuthenticationContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+ValidateClientType.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessAuthenticationContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+ValidateIdentityToken.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessAuthenticationContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+ResolveHostAuthenticationProperties.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessAuthenticationContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+ReformatValidatedTokens.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ValidateAuthorizationRequestContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+Authentication+ValidateAuthentication.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ValidateAuthorizationRequestContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+Authentication+ValidateResponseType.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ValidateAuthorizationRequestContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+Authentication+ValidateClientRedirectUri.
[15:41:20 INF] The authentication request was rejected because invalid scopes were specified: ["role"].
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ValidateAuthorizationRequestContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+Authentication+ValidateScopes.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ValidateAuthorizationRequestContext was marked as rejected by OpenIddict.Server.OpenIddictServerHandlers+Authentication+ValidateScopes.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessRequestContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+Authentication+ValidateAuthorizationRequest.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessRequestContext was marked as rejected by OpenIddict.Server.OpenIddictServerHandlers+Authentication+ValidateAuthorizationRequest.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessErrorContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+AttachErrorParameters.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessErrorContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+AttachCustomErrorParameters.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ApplyAuthorizationResponseContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+Authentication+AttachRedirectUri.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ApplyAuthorizationResponseContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+Authentication+InferResponseMode.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ApplyAuthorizationResponseContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+Authentication+AttachResponseState.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ApplyAuthorizationResponseContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+Authentication+AttachIssuer.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ApplyAuthorizationResponseContext was successfully processed by OpenIddict.Server.AspNetCore.OpenIddictServerAspNetCoreHandlers+AttachHttpResponseCode`1[[OpenIddict.Server.OpenIddictServerEvents+ApplyAuthorizationResponseContext, OpenIddict.Server, Version=5.5.0.0, Culture=neutral, PublicKeyToken=35a561290d20de2f]].
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ApplyAuthorizationResponseContext was successfully processed by OpenIddict.Server.AspNetCore.OpenIddictServerAspNetCoreHandlers+AttachCacheControlHeader`1[[OpenIddict.Server.OpenIddictServerEvents+ApplyAuthorizationResponseContext, OpenIddict.Server, Version=5.5.0.0, Culture=neutral, PublicKeyToken=35a561290d20de2f]].
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ApplyAuthorizationResponseContext was successfully processed by OpenIddict.Server.AspNetCore.OpenIddictServerAspNetCoreHandlers+Authentication+ProcessFormPostResponse.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ApplyAuthorizationResponseContext was successfully processed by OpenIddict.Server.AspNetCore.OpenIddictServerAspNetCoreHandlers+Authentication+ProcessQueryResponse.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ApplyAuthorizationResponseContext was successfully processed by OpenIddict.Server.AspNetCore.OpenIddictServerAspNetCoreHandlers+Authentication+ProcessFragmentResponse.
[15:41:20 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ApplyAuthorizationResponseContext was successfully processed by OpenIddict.Server.AspNetCore.OpenIddictServerAspNetCoreHandlers+ProcessStatusCodePagesErrorResponse`1[[OpenIddict.Server.OpenIddictServerEvents+ApplyAuthorizationResponseContext, OpenIddict.Server, Version=5.5.0.0, Culture=neutral, PublicKeyToken=35a561290d20de2f]].
[15:41:20 INF] The response was successfully returned as a plain-text document: {
"error": "invalid_scope",
"error_description": "The specified 'scope' is invalid.",
"error_uri": "https://documentation.openiddict.com/errors/ID2052"
}.
environment ts file:
oAuthConfig: {
issuer: 'https://localhost:44385/',
redirectUri: baseUrl,
clientId: 'PartnerPortal_App',
responseType: 'code',
scope: 'offline_access openid profile role email phone PartnerPortal',
requireHttps: true
},

Invoking IdentityServer endpoint: IdentityServer4.Endpoints.AuthorizeEndpoint for /connect/authorize
[09:35:56 DBG] Start authorize request
[09:35:56 DBG] No user present in authorize request
[09:35:56 DBG] Start authorize request protocol validation
[09:35:56 ERR] Unknown client or not enabled: PartnerPortal_App
{"ClientId": null, "ClientName": null, "RedirectUri": null, "AllowedRedirectUris": null, "SubjectId": "anonymous", "ResponseType": null, "ResponseMode": null, "GrantType": null, "RequestedScopes": "", "State": null, "UiLocales": null, "Nonce": null, "AuthenticationContextReferenceClasses": null, "DisplayMode": null, "PromptMode": "", "MaxAge": null, "LoginHint": null, "SessionId": null, "Raw": {"response_type": "code", "client_id": "PartnerPortal_App", "state": "dS5jYy0xNGZBenBVNk9RZkZaLURqa35ubVkzMXVlSVdlX2FnSXRJdXFoNWlh", "redirect_uri": "http://localhost:4200", "scope": "offline_access openid profile role email phone PartnerPortal", "code_challenge": "9UgsS7QtePtvo10d2NkPR2yEsuJLVMdMfYrFmj5JvV8", "code_challenge_method": "S256", "nonce": "dS5jYy0xNGZBenBVNk9RZkZaLURqa35ubVkzMXVlSVdlX2FnSXRJdXFoNWlh", "culture": "en", "ui-culture": "en", "selectedTenantId": "7a50f0a8-38e8-0807-55b4-3a040dbaffd1"}, "$type": "AuthorizeRequestValidationLog"}
[09:35:56 ERR] Request validation failed
[09:35:56 INF] {"ClientId": null, "ClientName": null, "RedirectUri": null, "AllowedRedirectUris": null, "SubjectId": "anonymous", "ResponseType": null, "ResponseMode": null, "GrantType": null, "RequestedScopes": "", "State": null, "UiLocales": null, "Nonce": null, "AuthenticationContextReferenceClasses": null, "DisplayMode": null, "PromptMode": "", "MaxAge": null, "LoginHint": null, "SessionId": null, "Raw": {"response_type": "code", "client_id": "PartnerPortal_App", "state": "dS5jYy0xNGZBenBVNk9RZkZaLURqa35ubVkzMXVlSVdlX2FnSXRJdXFoNWlh", "redirect_uri": "http://localhost:4200", "scope": "offline_access openid profile role email phone PartnerPortal", "code_challenge": "9UgsS7QtePtvo10d2NkPR2yEsuJLVMdMfYrFmj5JvV8", "code_challenge_method": "S256", "nonce": "dS5jYy0xNGZBenBVNk9RZkZaLURqa35ubVkzMXVlSVdlX2FnSXRJdXFoNWlh", "culture": "en", "ui-culture": "en", "selectedTenantId": "7a50f0a8-38e8-0807-55b4-3a040dbaffd1"}, "$type": "AuthorizeRequestValidationLog"}
[09:35:56 INF] {"ClientId": "PartnerPortal_App", "ClientName": null, "RedirectUri": null, "Endpoint": "Authorize", "SubjectId": null, "Scopes": "", "GrantType": null, "Error": "unauthorized_client", "ErrorDescription": "Unknown client or client not enabled", "Category": "Token", "Name": "Token Issued Failure", "EventType": "Failure", "Id": 2001, "Message": null, "ActivityId": "0HN6IVL4KETP2:00000001", "TimeStamp": "2024-09-12T07:35:56.0000000Z", "ProcessId": 13528, "LocalIpAddress": "::1:44385", "RemoteIpAddress": "::1", "$type": "TokenIssuedFailureEvent"}
[09:35:56 INF] The response could not be cached for this request.
[09:35:56 INF] Request finished HTTP/2 GET https://localhost:44385/connect/authorize?response_type=code&client_id=PartnerPortal_App&state=dS5jYy0xNGZBenBVNk9RZkZaLURqa35ubVkzMXVlSVdlX2FnSXRJdXFoNWlh&redirect_uri=http%3A%2F%2Flocalhost%3A4200&scope=offline_access%20openid%20profile%20role%20email%20phone%20PartnerPortal&code_challenge=9UgsS7QtePtvo10d2NkPR2yEsuJLVMdMfYrFmj5JvV8&code_challenge_method=S256&nonce=dS5jYy0xNGZBenBVNk9RZkZaLURqa35ubVkzMXVlSVdlX2FnSXRJdXFoNWlh&culture=en&ui-culture=en&selectedTenantId=7a50f0a8-38e8-0807-55b4-3a040dbaffd1 - 302 0 null 168.9828ms
[09:35:56 INF] Request starting HTTP/2 GET https://localhost:44385/Account/Error?errorId=CfDJ8IfPL4gEj_lBlyYCXb43SqCQlGHbLin3iWrDERZZZMPJXGXDBNB-bwtAJHEUnE242e8WY60fcVCIASDxpBEYeN0k13jJ1H9mNSImPVBZPxGi7pxqhtvS3hp8vg7b4gaNmgpnFDaHA1ooJcMlLiGutarupbmMy109a971491ckIYvI5X9rVQoizC3tdkyK133SyrHal7oPArA8y-dwRcUEinnzXAtK_C0_nxjb2c5qRprPOIsm_JDk8v-Asl9_5KT_CTyQ4Y54LqtBE_m6gFkd-z2rjqg6L9As9rfnk-i9y9vNnRDNXwn9eHonuzxcsGxjIbLad4kczs1k1fjqjQbHZ_Fb1OW8f3jCnu-hDw4wsH4oJpVGXP2Er0ULCyUq1PXcA - null null
[09:35:56 INF] No cached response available for this request.
[09:35:56 INF] Executing endpoint 'Volo.Abp.Account.Web.Areas.Account.Controllers.ErrorController.Index (Volo.Abp.Account.Pro.Public.Web.IdentityServer)'
[09:35:56 INF] Route matched with {area = "account", action = "Index", controller = "Error", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] Index(System.String) on controller Volo.Abp.Account.Web.Areas.Account.Controllers.ErrorController (Volo.Abp.Account.Pro.Public.Web.IdentityServer).
[09:35:56 INF] Executing action method Volo.Abp.Account.Web.Areas.Account.Controllers.ErrorController.Index (Volo.Abp.Account.Pro.Public.Web.IdentityServer) - Validation state: Valid
[09:35:56 INF] Executed action method Volo.Abp.Account.Web.Areas.Account.Controllers.ErrorController.Index (Volo.Abp.Account.Pro.Public.Web.IdentityServer), returned result Microsoft.AspNetCore.Mvc.ViewResult in 5.1196ms.
[09:35:56 INF] Executing ViewResult, running view ~/Views/Error/500.cshtml.
Start host, start angular, go to localhost:4200/loginmethod, select tenant, click sign in.