Skip to content

axios cannot use system proxy, causing failure to fetch OpenID configuration from Microsoft endpoint #15644

@TheBigHouse

Description

@TheBigHouse

Title: axios does not respect system proxy and causes failure to fetch OpenID configuration

Description:

I am experiencing an issue where axios cannot properly in getConfig() use the system proxy settings, which results in a failure when requesting the following endpoint:

https://login.microsoftonline.com/botframework.com/v2.0/.well-known/openid-configuration

In my environment, direct access to external services is blocked and requires going through a system proxy. However, axios does not appear to automatically detect or use the system proxy, so the request fails.

Expected behavior:

Axios should be able to:

Respect system proxy settings automatically, or
Provide a way to optionally enable proxy support via configuration or startup parameters

For example, it would be ideal if proxy usage could be optional and configurable, such as:

axios.create({
proxy: {
host: '127.0.0.1',
port: 7890
}
})

Or better, support something like:

AXIOS_PROXY=http://127.0.0.1:7890

or other mechanisms that allow enabling proxy only when needed.

Actual behavior:

Axios does not use the system proxy by default
Requests to external endpoints fail in proxy-required environments

Impact:

Because the OpenID configuration cannot be retrieved, the application is unable to validate authentication tokens. This breaks the entire authentication flow (e.g., JWT validation against Microsoft identity endpoints), making it impossible to verify user identity or proceed with authorized requests.

Suggested improvement:

Add support for automatic detection of system proxy settings
Provide an optional proxy configuration mechanism (e.g., environment variable or startup parameter)
Ensure proxy usage can be enabled without requiring it to be hardcoded

Thank you for your time and consideration. This would greatly improve axios usability in enterprise and restricted network environments.

Metadata

Metadata

Labels

needs attentionThis issue needs the attention of a contributor.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions