Skip to content

[Bug] GetAuthorizationUri should not add x-client-os #5451

@bgavrilMS

Description

@bgavrilMS

Library version used

4.72.1

.NET version

all

Scenario

ConfidentialClient - web site (AcquireTokenByAuthCode)

Is this a new or an existing app?

The app is in production, I haven't upgraded MSAL, but started seeing this issue

Issue description and reproduction steps

cca.GetAuthorizationUri generates the auth URI and adds a few query parameters, like x-client-os. This is used by ESTS as a hint to determine the OS and if it is not understood, the STS will fallback to UserAgent.

But since cca.GetAuthorizationUri is used on the backend, the OS is that of the server, either Linux or Windows. This is confusing ppl, because they open their website on their ios phone, but the OS shows up as Linux in the Entra logs.

Proposed solution: stop adding x-client-os to the uri
Impact: it will make ests internal logs simpler

Relevant code snippets

Expected behavior

No response

Identity provider

Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)

Regression

No response

Solution and workarounds

No response

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions