-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Cannot resolve endpoints when used in combinaison with mailgun-js #5114
Comments
Hello @bgavrilMS @jmprieur @jennyf19 I absolutely need to get this working for the beginning of september to provide SSO to a big client using AzureAD. Thank you for your update |
Hi @Mrtblg - this is just a network error, an http call cannot be made. Looking closely to the error, it looks like you might have not configured the authority. See "undefined" there. |
Hi @bgavrilMS I know it might look like it at first glance. But in reality the problem is caused some how by the Somehow, there is something in your library that is impacted by the Have you tried to add the package |
@derisen - do you have any idea what's happening? |
@Mrtblg - afaik, you can introduce your own network layer, see microsoft-authentication-library-for-js/lib/msal-node/src/config/Configuration.ts Line 125 in a43ec23
|
Looks like this could be caused by something in |
More detail: MONEI/Shopify-api-node#406 (comment) It looks like |
@jasonnutter thank you for the investigation. I migrated to Thank you for your help ! |
Core Library
MSAL Node (@azure/msal-node)
Core Library Version
1.12.1
Wrapper Library
Not Applicable
Wrapper Library Version
None
Public or Confidential Client?
Confidential
Description
When importing "mailgun-js": "^0.22.0" (latest) the msal library will fail oAuth with an error message
The bug is very easy to reproduce, juste create a running application with the following
package.json
Then in your running and working application just add
const mailGun = require("mailgun-js");
try to oAuth and you will get an error.Comment the line
const mailGun = require("mailgun-js");
and oAuth works again.Somehow importing mailgun-js messes up msal-node
Error Message
{"errorCode":"endpoints_resolution_error","errorMessage":"Error: could not resolve endpoints. Please check network and try again. Detail: ClientAuthError: openid_config_error: Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints. Attempted to retrieve endpoints from: https://undefined/common/v2.0/.well-known/openid-configuration","subError":"","name":"ClientAuthError"}
Msal Logs
[Thu, 18 Aug 2022 17:35:48 GMT] : @azure/msal-node@1.12.1 : Info - getAuthCodeUrl called
[Thu, 18 Aug 2022 17:35:48 GMT] : @azure/msal-node@1.12.1 : Verbose - initializeRequestScopes called
[Thu, 18 Aug 2022 17:35:48 GMT] : [c990a71c-7df6-429b-a8a5-7822e83c3893] : @azure/msal-node@1.12.1 : Verbose - buildOauthClientConfiguration called
[Thu, 18 Aug 2022 17:35:48 GMT] : [c990a71c-7df6-429b-a8a5-7822e83c3893] : @azure/msal-node@1.12.1 : Verbose - building oauth client configuration with the authority: https://login.microsoftonline.com/common/
[Thu, 18 Aug 2022 17:35:48 GMT] : [c990a71c-7df6-429b-a8a5-7822e83c3893] : @azure/msal-node@1.12.1 : Verbose - createAuthority called
{"errorCode":"endpoints_resolution_error","errorMessage":"Error: could not resolve endpoints. Please check network and try again. Detail: ClientAuthError: openid_config_error: Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints. Attempted to retrieve endpoints from: https://undefined/common/v2.0/.well-known/openid-configuration","subError":"","name":"ClientAuthError"}
MSAL Configuration
Relevant Code Snippets
Reproduction Steps
Intall "mailgun-js": "^0.22.0"
import/require it
try to oAuth
Expected Behavior
It should be working along with mailgun-js
Identity Provider
Azure AD / MSA
Browsers Affected (Select all that apply)
None (Server)
Regression
No response
Source
External (Customer)
The text was updated successfully, but these errors were encountered: