Skip to content

Acquiring tokens for Agent identities should be possible with Client secrets #3470

@jmprieur

Description

@jmprieur

Microsoft.Identity.Web Library

Microsoft.Identity.Web

Microsoft.Identity.Web version

3.14.0

Web app

Not Applicable

Web API

Not Applicable

Token cache serialization

Not Applicable

Description

Try to acquire a token for a user agent identity with a client secret as client credentials. This does not work

Reproduction steps

use SourceType="ClientSecret"

Error message

Microsoft.Identity.Client.MsalServiceException : AADSTS9002324: Request should not contain more than one client credential parameters, this includes 'client_secret', 'client_assertion' and 'request' parameters. Trace ID: e75765c8-2d78-487d-8ebd-ae0bc8995b00 Correlation ID: cea8d32a-89e1-45c4-8847-005975bc09aa Timestamp: 2025-09-09 20:14:30Z

Id Web logs

No response

Relevant code snippets

See AgntUserIdentityTestscs.cs and replace the cert by a client secret.

Regression

No response

Expected behavior

this works.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions