Long latencies from MSAL leading to timeouts
See original GitHub issueCore Library
MSAL Node (@azure/msal-node)
Core Library Version
1.14.1
Wrapper Library
Not Applicable
Wrapper Library Version
None
Public or Confidential Client?
Confidential
Description
We are experiencing long latencies when calling several methods for our Confidential client. I would imagine some network latencies occuring for SOME of these methods but the one that concerns me is getAuthCodeUrl
. This method is used to generate the redirect/sign-in URL to AAD. I would not expect these calls to ever take > 15 seconds to execute (We configured Promise.race
of 15 seconds). In the last 24 hours, we’ve received 62 hits on this method taking greater than 15 seconds.
Some other methods that are also showing timeouts on our side are:
- AcquireTokenByCode
- AcquireTokenByRefreshToken
Error Message
No response
Msal Logs
No response
MSAL Configuration
return new msal.ConfidentialClientApplication({
auth: {
clientId,
authority: this._authority,
clientCertificate: {
thumbprint: pem.thumbprint,
privateKey: pem.privateKey,
x5c: pem.certificate,
},
},
});
Relevant Code Snippets
private async sendRequest<T>(
log: CommonEventLogger.Scope,
operationPromise: Promise<T>
): Promise<T> {
const timeoutMs = 15000; // 15 seconds
try {
return await CommonUtils.promiseTimeout<T>(
<msalMethodPromise>,
timeoutMs,
ErrorCodes.MsalTimeoutError({ timeoutMs })
);
} catch (err) {
throw this.mapError(err, log);
}
}
Reproduction Steps
Unfortunately, we do not have repro steps for forcing a timeout to occur.
Expected Behavior
I would expect getAuthCodeUrl
not to take > 15 seconds to generate.
Identity Provider
Azure AD / MSA
Browsers Affected (Select all that apply)
None (Server)
Regression
No response
Source
Internal (Microsoft)
Issue Analytics
- State:
- Created 10 months ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
FYI, we’ve monitored and do not have any concerns about our event loop delay in NodeJS.
Root cause not resolved, still trying to root cause the issue from #4879