> ## Documentation Index
> Fetch the complete documentation index at: https://docs.requestly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# NTLM

> Authenticate against Windows and Active Directory endpoints with NTLM.

NTLM is the challenge-response scheme Windows services use. It is what you reach for against IIS endpoints, on-premise SharePoint and Exchange, and internal APIs joined to an Active Directory domain.

Like Digest, NTLM is a conversation rather than a single header. Requestly sends the request, reads the server's challenge, answers it with a response derived from your password, and replays. All three exchanges travel over the same connection.

NTLM applies to HTTP requests. It is not offered for gRPC, and a WebSocket, Socket.IO, or GraphQL request cannot perform the handshake.

<Info>
  NTLM authentication requires the desktop app. [Download Requestly](https://requestly.com/downloads).
</Info>

In the web app NTLM cannot be selected.

<Frame>
  <img src="https://mintcdn.com/requestly/eVaYS_FXw1j-9uVi/images/authorization/ntlm-form-desktop.light.png?fit=max&auto=format&n=eVaYS_FXw1j-9uVi&q=85&s=798bae4dfecdca878ef85f99b72ebdc2" alt="NTLM form in the Authorization tab of the desktop app, showing username, password, domain, and workstation fields." className="dark:hidden" width="1280" height="800" data-path="images/authorization/ntlm-form-desktop.light.png" />

  <img src="https://mintcdn.com/requestly/eVaYS_FXw1j-9uVi/images/authorization/ntlm-form-desktop.dark.png?fit=max&auto=format&n=eVaYS_FXw1j-9uVi&q=85&s=8b8a7d114a83618341a26f3ebb5ca33b" alt="NTLM form in the Authorization tab of the desktop app, showing username, password, domain, and workstation fields." className="hidden dark:block" width="1280" height="800" data-path="images/authorization/ntlm-form-desktop.dark.png" />
</Frame>

## Set up NTLM

<Steps>
  <Step title="Open the Authorization tab">
    Open any request or collection in the desktop app, then go to the **Authorization** tab.
  </Step>

  <Step title="Select NTLM">
    Pick **NTLM** from the **Authorization Type** dropdown. The four NTLM fields appear below the dropdown.
  </Step>

  <Step title="Enter your domain credentials">
    Fill in **Username** and **Password**, then **Domain** if your account belongs to one. See the field reference below.
  </Step>

  <Step title="Send the request">
    Click **Send**. Requestly completes the three-message handshake and returns the authenticated response.
  </Step>
</Steps>

## Field reference

| Field           | Purpose                                                                                                                                                |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Username**    | Your account name. You can write it bare (`jdoe`) and set **Domain** separately, or use the combined `DOMAIN\jdoe` form and leave **Domain** blank.    |
| **Password**    | The password for that account.                                                                                                                         |
| **Domain**      | The Active Directory or Windows domain the account belongs to, such as `CORP`. Leave blank for a local machine account.                                |
| **Workstation** | Optional. The client machine name to report to the server. Most servers ignore it; leave it blank unless your administrator asks for a specific value. |

All four fields accept Requestly [variables](../../environments-and-variables) and [vault](../../vault/vault) references.

<Warning>
  A domain password unlocks far more than one API. Store it as a [vault](../../vault/vault) secret and reference it as `{{vault:corp_password}}` so it never travels inside an exported collection.
</Warning>

## Inherit NTLM from a collection

A domain usually fronts many endpoints, so NTLM is a good fit for collection-level auth. Set it once on the collection and leave every request inside on **Inherit from parent**. Requestly walks up from the request to the nearest ancestor that sets a concrete auth type.

A request that picks its own auth type stops inheriting, and a collection or folder whose auth type is cleared or left unset stops the walk for everything below it.

## Troubleshooting

<AccordionGroup>
  <Accordion title="NTLM is missing or unselectable in the dropdown">
    The web app cannot use NTLM. Open the same project in the [desktop app](https://requestly.com/downloads). In the desktop app, NTLM is also unavailable while the execution target is the Cloud Agent, so switch the target back to your own machine.
  </Accordion>

  <Accordion title="The server returns 401 with correct credentials">
    Check how you split the account name. `DOMAIN\jdoe` in **Username** with `DOMAIN` also in **Domain** sends the domain twice and fails. Use one or the other.
  </Accordion>

  <Accordion title="The endpoint expects Kerberos or Negotiate">
    Requestly signs with NTLMv2. A server configured for Kerberos or SPNEGO only will refuse the handshake. Ask your administrator whether the endpoint accepts NTLM fallback.
  </Accordion>
</AccordionGroup>

## What's Next?

<CardGroup cols={3}>
  <Card title="Digest Auth" icon="shield" href="/api-client/send-api-request/authorization/digest">
    The other challenge-response scheme in the dropdown.
  </Card>

  <Card title="Vault" icon="lock" href="/api-client/vault/vault">
    Keep domain credentials off the collection.
  </Card>

  <Card title="Authorization" icon="key" href="/api-client/send-api-request/authorization">
    Back to every auth type Requestly supports.
  </Card>
</CardGroup>
