# Microsoft

## 1. Register Oauth2 applications

Follow the next link:

{% embed url="<https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade>" %}
Azure portal
{% endembed %}

![+ New registration](/files/vN5O2h8zoypuBKGohFbn)

![](/files/HQtO7dM9QVzGQNv4iKsh)

#### OneDrive file picker

You need to register one more URL in order to use the OneDrive Javascript file picker:

![](/files/YE8xWX93Lfbbbv9EDXyW)

<figure><img src="/files/e2ZXr1PPU9EwBDTzB9xo" alt=""><figcaption><p>/plugins/appmixer/microsoft/onedrive/picker</p></figcaption></figure>

And select both of these options:

![](/files/g9cvFnXrxT9UmE8T7zlP)

And save the changes:

![](/files/J4InzwYOhO00FfUxvFdk)

The next step is creating *clientId* and *clientSecret*:

![Add new client secret](/files/YhO2X0p70nO8kgEmZSbN)

Unfortunately, the secret has an expiration, you're going to have to create a new one in 2 years:

![](/files/MsHkFTe1JGFG1PVszjep)

Use the furthest date possible:

![](/files/hGAOZY7437W6N2N05oJb)

You will get a new secret, copy the *Value* into the clipboard:

![](/files/2kSAN3JFniYF9PSFvGBR)

This is the *clientSecret,* the Microsoft *Secret ID* is the Appmixer *clientId.* These secrets need to be added into the Backoffice:

![](/files/JURP3KmRtrXLV3Pjvanp)

![appmixer:microsofr](/files/GM0VX51aFijxKMBsoAeS)

And add new keys:

![](/files/gE2nwhd9H3SuuR08c8lC)

The *clientId* is the \_Application (client) ID f\_rom the main page:

![](/files/DizNIL7X9tkgGqhEdLc6)

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

Then go to the *API permissions* section:

![](/files/lKEqCzR9HQDcVGkB2Hnf)

Choose *Microsoft Graph*:

![](/files/mpF7tUZF92kYEKL9doJk)

Delegated permissions:

![](/files/mfFe9JlBf2apjoFS8418)

Type-in *Files*:

![](/files/jj5BWhE4Y08cjarEfAD3)

And select these two:

![](/files/lnGYzrZAQJHKqSg4dOMi)

Then type-in *offline* and select this permission:

![](/files/GFLZm6qeRa0sj2u3mBi5)

![](/files/bcaf96nYYiaGT6CBn9Hf)

The final set of permissions:

![](/files/DGhc3WNlmeoPiQkX5A1O)

## 2. Allowing Custom Tenant

To enable custom tenant functionality for Microsoft connections, follow these steps:

### Step 1: Access Appmixer Admin

Navigate to your Appmixer admin panel (back office) and go to **Connector Configuration**.

### Step 2: Locate Microsoft Connector

* Find the "appmixer:microsoft" connector in the list
* If it doesn't exist, add it by clicking the **Add Configuration** button

![](/files/ZViBx6mZWuiQTM26Qs96)

* Click on **"Show Configuration Values"**

![](/files/2Claj561scrWecZryAW5)

### Step 3: Add Tenant Configuration

1. Click **"Add Item"** to create a new configuration entry

![](/files/fbfe1Tt0YvSaI8Y0h6SD)

2. Set the following values:

* **Key**: `microsoftTenant`
* **Value**: `true`

3. Click **Confirm** to save the configuration

![](/files/VSOwR8j47to4eOg7pI9c)

> **Note**: This configuration enables the tenant field in the Microsoft connection interface.

### Step 4: Connect with Custom Tenant

1. Return to your flow and locate a Microsoft connector
2. Click **"Connect account"**
3. You should now see a **"Tenant"** field in the connection form

![](/files/TyorTHxnEgZ09RDLqG1v)

4. Enter your Tenant ID in the field

### Tenant Value Options

* **Custom Tenant ID**: Enter your organization's specific tenant identifier
* **Default Behavior**: Enter `common` to use Microsoft's default multi-tenant behavior

> **💡 Tip**: If you're unsure about your Tenant ID, you can find it in the Azure Active Directory overview page in the Azure portal.

### Disable Custom Tenant

* Simply **remove** the "microsoftTenant" from the Configuration Values or set its value to `false`


---

# 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.appmixer.com/connector-configuration/microsoft.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.
