两个AAD应用程序之间的通信:错误AADSTS65001

问题描述 投票:0回答:1

我收到错误消息:“ AADSTS65001:用户或管理员不同意使用ID为...的应用程序。

我们在天蓝色上有2个应用程序注册,比如说应用程序A和应用程序B。我试图从A到B获取一些数据。

在Azure门户中,我已经配置了权限,因此B应用程序可以访问应用程序A,并且它的状态被授予。

我正在使用msal-angular库对用户进行身份验证并实现这一点。这是我的配置:

export const protectedResourceMap:[string, string[]][]=[ ['https://graph.microsoft.com/v1.0/me', ['user.read']], ['endpoint of app A',['scope from the app A']] ];

MsalModule.forRoot({
        clientID: 'ClientId Of App B',
        authority: "https://login.microsoftonline.com/common/",
        validateAuthority: true,
        redirectUri: "http://localhost:4200/",
        cacheLocation : "localStorage",
        storeAuthStateInCookie: isIE, // set to true for IE 11
        postLogoutRedirectUri: "http://localhost:4200/",
        navigateToLoginRequestUrl: true,
        popUp: !isIE,
        consentScopes: [ "user.read", "openid", "profile", "scope from the app A"],
        unprotectedResources: ["https://www.microsoft.com/en-us/"],
        protectedResourceMap: protectedResourceMap,
        logger: loggerCallback,
        correlationId: '1234',
        piiLoggingEnabled: true
      }
    )

因此,第一件事是登录应用程序B,身份验证成功,令牌被接收并存储在本地存储中。第二件事是向应用A发出http请求以获取一些数据。调用http时,错误会弹出。

请帮助!

azure-active-directory msal microsoft-identity-platform
1个回答
0
投票

我只是个人遇到了此问题(但使用.Net Web应用程序)。您使用“公共”端点,所以我想它是多租户应用程序注册。在使用版本2端点授权之前,我无法使我的应用正常运行,即在授权字段中添加“ /v2.0”:

© www.soinside.com 2019 - 2024. All rights reserved.