Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instrument account type #7049

Merged
merged 5 commits into from
Apr 23, 2024
Merged

Instrument account type #7049

merged 5 commits into from
Apr 23, 2024

Conversation

konstantin-msft
Copy link
Collaborator

@konstantin-msft konstantin-msft commented Apr 22, 2024

  • Instrument account type
  • Fix acquireTokenByCode native flow instrumentation.

NOTE Account type is instrumented before (if exists) and after network/cache call to make it defined for failed requests when no response is returned.

@github-actions github-actions bot added msal-browser Related to msal-browser package msal-common Related to msal-common package labels Apr 22, 2024
): "AAD" | "MSA" | "B2C" | undefined {
const idTokenClaims = account?.idTokenClaims;
if (idTokenClaims?.tfp || idTokenClaims?.acr) {
return "B2C";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we ever expect this condition to be hit when collecting telemetry? AFAIK no 1P apps are using B2C

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not expect this condition to be hit for 1P apps. However, i would prefer to handle this scenario for 3P apps injecting custom performance clients.

@konstantin-msft konstantin-msft merged commit 23df98f into dev Apr 23, 2024
45 checks passed
@konstantin-msft konstantin-msft deleted the instrument_account_type branch April 23, 2024 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
msal-browser Related to msal-browser package msal-common Related to msal-common package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants