Use the tenantId property instead (#260418)

since it _seems_ most of the time, the idTokenClaims are not present.
This commit is contained in:
Tyler James Leonhardt
2025-08-07 15:02:13 -07:00
committed by GitHub
parent e2bf82fb5a
commit 86ff5cd43b

View File

@@ -129,10 +129,7 @@ export class MsalAuthProvider implements AuthenticationProvider {
// Send telemetry for existing accounts
for (const cachedPca of this._publicClientManager.getAll()) {
for (const account of cachedPca.accounts) {
if (!account.idTokenClaims?.tid) {
continue;
}
const tid = account.idTokenClaims.tid;
const tid = account.tenantId;
const type = tid === MSA_TID || tid === MSA_PASSTHRU_TID ? MicrosoftAccountType.MSA : MicrosoftAccountType.AAD;
this._telemetryReporter.sendAccountEvent([], type);
}