Skip to content

Bug report: M365 login from behind corp proxy = Error: could not resolve endpoints #2698

@alteredpark

Description

@alteredpark

Description

I'm attempting to setup and configure M365 CLI on some of our servers which are behind a proxy and I'm running into issues with the setup, probably something I'm missing but I'm not overly familiar with node/npm etc.

Steps to reproduce

Firstly I installed nodejs
Then ran
npm config set proxy http://proxyname:port npm config set https-proxy http://proxyname:port
and then npm install -g @pnp/cli-microsoft365

install took place and m365 status = logged out. So the module installed, just an issue connecting.

Expected results

M365 Login should prompt me to visit Azure to validate my login using the browser.

Actual results

Running m365 login returns:
Error: endpoints_resolution_error: Error: could not resolve endpoints. Please check network and try again. Detail: Clie tConfigurationError: untrusted_authority: The provided authority is not a trusted authority. Please include this author ty in the knownAuthorities config parameter.

Diagnostics

I've double checked the proxies and they return as the correct values from above
npm config get proxy http://proxyname:port
npm config get https-proxy https://proxyname:port

CLI for Microsoft 365 version

v3.13.0

nodejs version

v14.17.5

Operating system (environment)

Windows Server 2016 x64 1607

Shell

Windows PowerShell 5.1

cli doctor

Error: Log in to Microsoft 365 first

Additional Info

Some pointers on what I'm missing would be appreciated. TIA

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions