Skip to content

Add tests to guard client-capability (xms_cc) forwarding in CCA flows #3349

@gladjohn

Description

@gladjohn

Microsoft.Identity.Web Library

Microsoft.Identity.Web

Microsoft.Identity.Web version

latest

Web app

Sign-in users

Web API

Protected web APIs (validating tokens)

Token cache serialization

In-memory caches

Description

Code inspection shows that TokenAcquisition never calls WithClientCapabilities() on any MSAL builder

https://github.com/AzureAD/microsoft-identity-web/blob/master/src/Microsoft.Identity.Web.TokenAcquisition/TokenAcquisition.cs#L795

Reproduction steps

"AzureAd": {
    "Instance": "https://login.microsoftonline.com/",
    "TenantId": "msidlab4.onmicrosoft.com",
    "ClientId": "<>"
    "ClientCapabilities": [ "cp1" ],
    "ClientCredentials": [
        {
            "SourceType": "CustomSignedAssertion",
            "CustomSignedAssertionProviderName": "OidcIdpSignedAssertion",
            "CustomSignedAssertionProviderData": {
                "ConfigurationSection": "AzureAd2"
            }
        }
    ]

Relevant code snippets

https://github.com/AzureAD/microsoft-identity-web/blob/master/src/Microsoft.Identity.Web.TokenAcquisition/TokenAcquisition.cs#L795

Regression

Doesn't seem like this ever worked.

Based on investigation

Feature already works (tokens include CP1) and that the PR is strictly test-coverage.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions