microsoft-authentication-library-for-js: setClientCredential() errors when no `clientCertificate` property is set
Core Library
MSAL Node (@azure/msal-node)
Core Library Version
2.11.0
Wrapper Library
Not Applicable
Wrapper Library Version
None
Public or Confidential Client?
Confidential
Description
This commit stops checking if config.auth.clientCertificate is actually defined.
CC: @Robbie-Microsoft
Error Message
TypeError: Cannot read properties of undefined (reading ‘thumbprint’)
MSAL Logs
No response
Network Trace (Preferrably Fiddler)
- Sent
- Pending
MSAL Configuration
auth: {
authority: 'url',
clientId: 'guid',
clientSecret: 'secret',
}
Relevant Code Snippets
N/A
Reproduction Steps
Try authenticating without setting the clientCertificate property in the auth
Expected Behavior
Auth using clientSecret
Identity Provider
Entra ID (formerly Azure AD) / MSA
Browsers Affected (Select all that apply)
None (Server)
Regression
2.10.0
Source
External (Customer)
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 16
So this method should transform
ConfigurationtoNodeConfiguration, but it’s not guaranteed: https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/22651b30bce9244cce2d7ffcfa1a81e4c44be133/lib/msal-node/src/config/Configuration.ts#L210-L243In my case this line:
Actually does this:
Which results in:
A fix for this could be:
But to be sure, you would also have to do this for
DEFAULT_AUTH_OPTIONS.azureCloudOptionsand the same forDEFAULT_TELEMETRY_OPTIONS.application