All Apps and Add-ons

Proxy Support

gabrigr_ec
Explorer

I configured the proxy setting in this addon, yet I still see this in the log files:

ProxyError: HTTPSConnectionPool(host='login.microsoftonline.com', port=443): Max retries exceeded with url: /CANTSHOWTHISBIT/oauth2/v2.0/token (Caused by ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required',)))

If I check TA-MS-AAD/bin/ta_azure_utils/utils.py, I see that proxies can be set up differently:

def get_proxy(helper, proxy_type="requests"):
    proxies = None
    helper.log_debug("_Splunk_ Getting proxy server.")
    proxy = helper.get_proxy()

    if proxy:
        helper.log_debug("_Splunk_ Proxy is enabled: %s:%s" % (proxy["proxy_url"], proxy["proxy_port"]))
        if proxy_type.lower()=="requests":
            proxy_url = "%s:%s" % (proxy["proxy_url"], proxy["proxy_port"])
            proxies = {
                    "http" : proxy_url,
                    "https" : proxy_url
                }
        elif proxy_type.lower()=="event hub":
            proxies = {
                'proxy_hostname': proxy["proxy_url"],
                'proxy_port': int(proxy["proxy_port"]),
                'username': proxy["proxy_username"],
                'password': proxy["proxy_password"]
            }

    return proxies

So it seems it hardcodes the proxy_type to requests. The requests library does support proxy authentication by specifying the proxy url as PROTOCOL://USER:PASS@PROXY_URL

If I change the relevant code to this:

            proxy_url = "%s:%s@%s:%s" % (proxy["proxy_username"], proxy["proxy_password"], proxy["proxy_url"], proxy["proxy_port"])
            proxies = {
                    "http" : "http://%s" % proxy_url,
                    "https" : "https://%s" % proxy_url
                }

it seems to work

Is this a known issue?

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

Data Management Digest – May 2026

Welcome to the May 2026 edition of Data Management Digest!   As your trusted partner in data innovation, the ...