> For the complete documentation index, see [llms.txt](https://help.glpi-project.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.glpi-project.org/tutorials/fr/receivers/oauth_imap_google.md).

# Configuration OAuth IMAP Google

{% hint style="warning" %}
Google n'admet que des URLs pbuliques ET sécurisées (https). Si l'URL de votre GLPI n'est pas disponible depuis Internet, cette procédure ne sera pas applicable.
{% endhint %}

## Installer l'application OAuth IMAP

* Depuis **`Configuration`**> **`plugins`**, installez **`Oauth imap`**.

<div align="left"><img src="/files/b2ozqSVCJzSIc4iDg3Cj" alt="Installer le plugin"></div>

***

## Création d'un projet

* Depuis votre [console Google](https://console.cloud.google.com/) (un accès administrateur est requis), allez dans votre organisation puis nouveau projet

![Création d'un nouveau projet](/files/bHs5fLIRKxwiXiyraJvV)

* Saisissez le nom de votre projet
* Cliquez sur **`Créez`**

<div align="left"><img src="/files/L5Pdq85LDMiPbI7NVcy5" alt="Validation du projet"></div>

* Retournez dans votre organisation,
* Sélectionnez votre projet

![Sélection du nouveau projet](/files/sd3UbO5PLQMKWebTmxen)

***

## Configuration de l'accès OAuth

* Depuis le menu, cliquez sur **`APIs & Services`**.
* Puis **`Ecran de consentement OAuth`**.

<div align="left"><img src="/files/GRx7tjAkwGyzzt4A1ptY" alt="Voir les autorisations OAuth"></div>

### Information d'application

* Depuis l'aperçu, cliquez sur **`Commencez`**
* Indiquez le nom de l'application ainsi que l'utilisateur du support (les utilisateurs pourront vous contacter sur des questions concernant leur consentement)

<figure><img src="/files/Gw3YQJL3T4QSIVmfAmzp" alt=""><figcaption><p>Information de l'application</p></figcaption></figure>

### Audience

* Indiquez quelle type d'audience pourra utiliser cette application (ici interne car l'utilisateur qui sera à utiliser les services IMAP est un utilisateur de l'organisation)

<figure><img src="/files/3tC6cnD7xHpLMTlB3bUE" alt=""><figcaption><p>Paramétrage de l'audience</p></figcaption></figure>

### Information de contact

* Indiquez le nom du contact (ce contact sera informé des modifications effectuées sur l'application)

<figure><img src="/files/Xji6kIGhzjjiwq6SJlya" alt=""><figcaption><p>Indication de l'information du contact</p></figcaption></figure>

### Politique de données utilisateur des services Google API.

* Acceptez la Politique de données utilisateur des services Google API et cliquez sur **`Continuez`** et  **`Créer`**

<figure><img src="/files/ImJxKfPv333tk7GSzTl0" alt=""><figcaption><p>Finalisation de l'application</p></figcaption></figure>

***

## Création d'un client

### Type d'application

Il faut maintenant créer un client d'application qui fera le lien entre Google et votre instance GLPI grâce à un ID d'application et un secret client.

* Dans l'onglet **Clients,** cliquez sur **`Créer un client`**
* Sélectionnez **Application Web** dans le type d'application
* Entrez un nom pour votre application

<figure><img src="/files/5GkCHJ88NZNoHI14CI3u" alt=""><figcaption><p>Ajout de l'application Web</p></figcaption></figure>

### URIs de redirection autorisés

L'URL de retour devra être indiquée dans cette partie. Cette URL est indiquée dans GLPI dans la section **`Configuration`** > **`OAUth IMAP`** > **`+ Ajouter`**

<figure><img src="/files/e6voJ6OUtXmMWmCflbUa" alt=""><figcaption><p>Récupération de l'URL de callback</p></figcaption></figure>

* Indiquez cette URL dans la partie **URIs de redirection autorisés** de votre application

<div align="left"><figure><img src="/files/cWtuysE35bTnrytknhhI" alt=""><figcaption><p>Insertion de l'URL de retour</p></figcaption></figure></div>

* Cliquez sur **`Créer`** pour valider votre application

***

## Information d'application

{% hint style="warning" %}
A la prochaine étape, le **secret client** vous sera affiché. Dès que vous quitterez cet écran, il ne sera plus disponible. Pensez à le sauvegarder en lieu sûr
{% endhint %}

L'application est maintenant créée. Sur l'écran s'affiche l'ID d'application et le secret client qui seront à indiquez dans GLPI&#x20;

<div align="left"><figure><img src="/files/gDquUDrOWa10NspU3B99" alt=""><figcaption><p>Information application</p></figcaption></figure></div>

<figure><img src="/files/kHQQUoKk1gQNQjBqrQKm" alt=""><figcaption><p>Informations renseignées dans GLPI</p></figcaption></figure>

***

## Finalisation de la configuration GLPI&#x20;

Une fois les informations de votre application répertoriées dans GLPI, et que votre application est bien active, vous pouvez cliquez sur **`+ Ajouter`**

<figure><img src="/files/voqbaS1voKzmjRQ4XN7e" alt=""><figcaption><p>Application OAuth IMAP créée</p></figcaption></figure>

### Autorisation OAuth

L'autorisation OAuth est nécessaire pour que GLPI puisse utiliser les services IMAP de la boite mail en question.

* Depuis l'onglet **Autorisation OAuth**, cliquez sur **`+ Créer une autorisation`**
* Indiquez le compte autorisé à utiliser les services IMAP

<figure><img src="/files/JAckdZVGjScReJjP1vEm" alt=""><figcaption><p>Autorisation OAuth</p></figcaption></figure>

***

## Configuration du collecteur

* Depuis **`Configuration`** > **`Collecteurs`** > **`+ Ajouter`**
* Indiquez le serveur **`imap.google.com`**
* Dans **Options de connexion,** sélectionnez l'application **OAuth IMAP** créée précédemment
* Dans identifiant, sélectionnez l'utilisateur disposant de l'autorisation OAuth

<figure><img src="/files/Xl7D7nzCsBbIeevCeieJ" alt=""><figcaption><p>Configuration du collecteur</p></figcaption></figure>

***

## Plus d'informations

Pour plus d'information sur la configuration des collecteurs, veuillez vous référer à l'article suivant :&#x20;

<a href="/pages/rLcnTBdUWZ6IfD7rGHeX" class="button secondary">Configuration collecteur</a>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://help.glpi-project.org/tutorials/fr/receivers/oauth_imap_google.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
