首页 > 解决方案 > Angular、MSAL 和 Azure AD B2C 与组

问题描述

Angular 7、msal.js、msal-angular.js 和 AzureAD B2C(电子邮件提供商)。

我有 3 个资源:

我有以下路线:

const routes: Routes = [
  { path: '', redirectTo: '/home', pathMatch: 'full' },
  { path: 'home', component: HomeComponent },
  { path: '', component: MainLayoutComponent, canActivate : [MsalGuard], children:[
    { path: 'rolea', component: RoleAComponent },
    { path: 'roleb', component: RoleBComponent }
  ]}
];

我有身份验证工作,但是,没有 MSAL 如何与组一起使用的示例(假设 Azure AD B2C 组等效于角色)

这个 SO 很旧,正在讨论服务器端: Azure Active Directory B2C 中的按组授权

我找不到在 MSAL 和组之间进行通信以实现基于角色的访问所需的文档或代码,我们将不胜感激。

标签: angularazure-ad-b2cangular7msal

解决方案


推荐阅读