正在尝试使用Msal从控制台应用程序访问Web API时获得MsalServiceException:'AADSTS501461

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

我正在尝试在应用程序注册清单中使用acceptMappedClaims = true调用受Azure AD保护的Web Api。我正在使用ConfidentialClientApplication从控制台应用程序调用。下面是错误消息。

Microsoft.Identity.Client.MsalServiceException:'AADSTS501461:仅与应用程序GUID匹配的令牌受众或租户已验证域中的受众支持AcceptMappedClaims。更改资源标识符,或使用特定于应用程序的签名密钥。

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

如果您打算使用基于非验证域的标识符,则将收到您提供的错误。

下面是清单更改的exampleAcceptMappedClaims,并且已验证域匹配URI)

 "id": "901e4433-88a9-4f76-84ca-ddb4ceac8703",
    "acceptMappedClaims": true,
    "accessTokenAcceptedVersion": null,
    "addIns": [],
    "allowPublicClient": null,
    "appId": "9bcda514-7e6a-4702-9a0a-735dfdf248fd",
    "appRoles": [],
    "oauth2AllowUrlPathMatching": false,
    "createdDateTime": "2019-06-05T17:37:58Z",
    "groupMembershipClaims": null,
    "identifierUris": [
        "https://samajwt.dewi.red"
    ],
© www.soinside.com 2019 - 2024. All rights reserved.