# Entra Setup

In order to enable entra in your ngSurvey installation you have to first create a new application registration in your [Azure ](https://portal.azure.com)Active Directory portal.

![](/files/-MWou47snwQ3ftdy8yhx)

This newly created application will allow you to link NGSurvey with Entra. Set it up using its name and its redirection URI which should be the URI under which you have installed ngSurvey. Make also sure to set the Redirect URI as Single-page Application (SPA).

![](/files/-MWp2vbtNJI0vH5y85A_)

Once you have registered your application open its API permissions and add the the User.ReadAll and Groups.ReadAll permission to it.<br>

![](/files/-MWovgLYyj0Zphx4GAk4)

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

{% hint style="warning" %}
Entra users that can [add new users](/installation-setup/installation/active-directory/active-directory-users.md) in ngSurvey are required to have have both permissions assigned to their Entra Directory account in order to query the Entra user list and link users with ngSurvey.    &#x20;
{% endhint %}

In the permission screen grant the admin consent on the permissions.

![](/files/-MWowD2xRj4YxMmF1uZD)

The last step is to enable ID tokens in the application authentication page.

![](/files/-MWp3SFgipUJl_SxAH-i)

Once you have registered the application in Azure you're almost ready to go, the only thing left is to copy the Application (client) ID from the overview screen of your Entra Application registration screen.

![](/files/-MWoyUW-2PFoHIiCn8_W)

Paste that application ID in your ngSurvey [system settings](/installation-setup/system-settings.md) Active Directory / Entra section.

![](/files/-MWp-3kZbnEOr40DhMeS)

Click on the test button, if you're not logged into Entra  it will prompt a login screen. Login to make sure that the connection between Azure and ngSurvey is working.&#x20;

Well done, your Entra users are now able to log into ngSurvey using their account and you will able able to [add new Entra users to ngSurvey](/installation-setup/installation/azure-active-directory/untitled.md) to let them access and use ngSurvey.


---

# 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://docs.ngsurvey.com/installation-setup/installation/azure-active-directory/azure-active-directory-setup.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.
