> For the complete documentation index, see [llms.txt](https://docs.lithnet.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lithnet.io/okta-ma/installation/configuring-an-http-proxy.md).

# Configuring an HTTP proxy

Point the management agent at an HTTP proxy when the MIM server cannot reach Okta directly.

Skip this page if the MIM server can reach your Okta org directly.

The management agent uses the standard .NET proxy environment variables for both OAuth token requests and Okta API requests. It has no proxy settings of its own.

## Step 1: Set the environment variables

All Okta traffic is HTTPS, so `HTTPS_PROXY` is the setting that matters. Add `NO_PROXY` only if some hosts must bypass the proxy.

Open PowerShell as an administrator:

```powershell
[Environment]::SetEnvironmentVariable(
    'HTTPS_PROXY',
    'http://proxy.example.com:8080',
    'Machine')

[Environment]::SetEnvironmentVariable(
    'NO_PROXY',
    'localhost,127.0.0.1,.example.com',
    'Machine')
```

Use machine variables so the setting applies whichever account runs the MIM Synchronization Service.

`HTTP_PROXY` covers plain HTTP requests and `ALL_PROXY` acts as a fallback, but neither is needed here. Microsoft documents the full behavior under [HttpClient.DefaultProxy](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.defaultproxy).

## Step 2: Restart the MIM Synchronization Service

A running service does not pick up later changes to the machine environment. Restart it after adding, changing, or removing any of these variables.

## Step 3: Test

Open the Okta management agent properties and retrieve the schema. If that works, run a controlled import.

If it fails, check the proxy address and port, the firewall rules, whether the MIM Synchronization Service account is allowed through the proxy, and the management agent log.

## Removing the proxy configuration

```powershell
[Environment]::SetEnvironmentVariable('HTTPS_PROXY', $null, 'Machine')
[Environment]::SetEnvironmentVariable('NO_PROXY', $null, 'Machine')
```

Restart the MIM Synchronization Service afterwards. With no proxy variables set, .NET falls back to the proxy configuration of the account running the service, and sends requests directly if that account has none.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.lithnet.io/okta-ma/installation/configuring-an-http-proxy.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
