# Azure (Office 365)

## Prerequisites

* **Assigned roles**: Conditional Access Administrator and Security Administrator
* **Licence**: Microsoft Entra ID P1 or P2

## Step 1

In Azure go to **Conditional access** > **Named locations** > **IP ranges location**.

* Set **Name** + GoodAccess Gateway I&#x50;**/32** (example: 11.22.33.44/32)
* Check **Mark as trusted location** and **Create**

![](/files/IQRE9hXCy5baGuhE3W2U)

## Step 2

Go to **Policies** > **New Policy**

Choose your **New location** and specify who will have access.

<div><img src="/files/fZavz7YTts57eFfNETz5" alt=""> <figure><img src="/files/KLoYe8WUeCSC6hoDGpu1" alt=""><figcaption></figcaption></figure></div>

## Step 3

Switch to **Cloud apps or actions** and set restrictions.

<figure><img src="/files/STIJp9HJVpAnyRHwoEcb" alt=""><figcaption></figcaption></figure>

## Step 4

Open **Conditions** > **Locations** > **Switch Configure** to **Yes**.

* **Include** - Any location
* **Exclude** - Selected locations

<div><img src="/files/gc7QbWhOsj1SKRaOq02t" alt=""> <figure><img src="/files/KSSre4wVq8bLt3CNffc4" alt=""><figcaption></figcaption></figure></div>

## **Step 5**

Continue to **Grant**, choose **Block access** and **confirm** with **Select.**

Don't forget to set **Enable policy** to **On** before saving the configuration.

<figure><img src="/files/tkjxLkVXCIqGycwcvhdt" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://support.goodaccess.com/configuration-guides/ip-whitelisting/azure-office-365.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
