EntraExporter icon indicating copy to clipboard operation
EntraExporter copied to clipboard

Use EntrExporter behind corporative proxy

Open dcandela12 opened this issue 1 year ago • 3 comments

I'm trying to automate the process via Azure DevOps, and I want to use a self-hosted agent but this one is behind a corporate proxy to navigate through internet, so I've been checking the automation from devops running the Entra-Exporter module and have been doing the tests, but the error I get is Unable to connect to the remote server, doing some troubleshooting is because the module is not pulling the traffic through the proxy, I was wondering if it is possible to somehow use Entra-Exporter via proxy. Otherwise I could not run it because it exceeds more than 60m export on an Azure agent and gives me timeout.

@merill there is any option to execute this with proxy?

dcandela12 avatar May 06 '24 19:05 dcandela12

The Microsoft\CSS-Exchange repo has a couple of great shared functions that help detect and negotiate proxy servers for their scripts. Check the ScriptUpdateFunctions folder for potential solutions in Invoke-WebRequestWithProxyDetection.ps1 and Confirm-ProxyServer.ps1. (I also like the model they built for scripts that check for newer versions!)

SamErde avatar May 31 '24 13:05 SamErde

We use Graph PowerShell so the proxy support will need to come from there.

It looks like you can follow the general PowerShell options to set a proxy. See this blog post for options.

https://woshub.com/using-powershell-behind-a-proxy/

merill avatar Jun 09 '24 23:06 merill

As a side note, if you can already connect to the Graph API on your own, you can skip the Connect-EntraExporter function and just run Export-Entra with your desired parameters.

SamErde avatar Jun 11 '24 14:06 SamErde