> For the complete documentation index, see [llms.txt](https://docs.inogic.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inogic.com/predict4dynamics/configuration/configure-application-user.md).

# Configure Application User

To configure Application user follow the below steps:&#x20;

### **Create an App Registration in Microsoft Entra ID (to obtain the three keys)**

* Open the Azure portal for the **Microsoft Entra ID (Azure AD)** tenant that hosts the Dataverse environment (this may be a different tenant than where the container app is deployed).

<div data-with-frame="true"><figure><img src="/files/JJLNUGXY6oGKa1IdUBLA" alt=""><figcaption></figcaption></figure></div>

* Navigate to **Manage → App registrations** and click **New registration.**

<div data-with-frame="true"><figure><img src="/files/k98AW8upcS6HckbriG4A" alt=""><figcaption></figcaption></figure></div>

* Enter the **application name** and select the first (default) option for supported account types, then click **Register.**

<div data-with-frame="true"><figure><img src="/files/RSN2gzUKwkVrWxovIe7F" alt=""><figcaption></figcaption></figure></div>

* Copy the Directory (tenant) ID → this becomes d365-tenant-id.
* After the app registration is created:
* Open the application registration and copy the Application (client) ID → this becomes d365-client-id and Copy the Directory (tenant) ID → this becomes d365-tenant-id.\ <br>

  <div data-with-frame="true"><figure><img src="/files/AKuRrC2KBXNegA8QD61A" alt=""><figcaption></figcaption></figure></div>

### **Grant API Permissions for Dynamics CRM**

In the app registration, go to Manage → API permissions → Add a permission. Select Dynamics CRM from the API list.

<div data-with-frame="true"><figure><img src="/files/xk3TXzbLNhBRT9MCm0Q7" alt=""><figcaption></figcaption></figure></div>

Choose Delegated permissions and then check **user\_impersonation**, then **click Add permissions**.

<div data-with-frame="true"><figure><img src="/files/5cAHFdNwwN3NFBzLEZgu" alt=""><figcaption></figcaption></figure></div>

Click **Grant admin consent** to apply the permission for the tenant. This ensures the app can call Dynamics CRM APIs as the signed-in user.

<div data-with-frame="true"><figure><img src="/files/lNvLuB2uTtyvVenwvpGX" alt=""><figcaption></figcaption></figure></div>

### **Create a Client Secret (d365-client-secret)**

In the app registration, go to **Manage → Certificates & secrets → New client secret**. Create a new secret and optionally set its expiry. Click Add.

<div data-with-frame="true"><figure><img src="/files/NnYJc9YmiqgnBIq3ObgJ" alt=""><figcaption></figcaption></figure></div>

**Immediately copy the secret value** — this value is shown only once. This copied value is the d365-client-secret you will add to the Container App secrets. **If you leave the page, you cannot retrieve this value later.**

<div data-with-frame="true"><figure><img src="/files/eR8eX4xzqHrLgAFtDf2E" alt=""><figcaption></figcaption></figure></div>

{% hint style="success" %}
For any queries, reach out to us at <crm@inogic.com>
{% endhint %}
