For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Agent Config

Requirements (self-hosted)

GLPI Version
Minimum PHP
Recommended

11.0.x

8.2

8.4

12.0.X

8.3

8.5

A GLPI Network BASIC subscription (or higher) is required. This plugin is also available for all GLPI Network Cloud instances.


Limitation

Concerned Version

Since Android 10 (API level 29)

Limitation

Since Android 10 (API level 29), Google has strengthened restrictions related to accessing sensitive device information, such as IMEI and serial numbers, to protect user privacy. These changes are part of Google’s efforts to limit access to sensitive data and prevent permission abuse by applications.

Here is why we can no longer retrieve this information directly:

1. IMEI and Permission Restrictions

  • The IMEI is considered sensitive and private information.

  • Since Android 10, only applications with the special permission READ_PRIVILEGED_PHONE_STATE can access the IMEI. This permission is only available to system applications or those preinstalled by the manufacturer.

  • Third-party applications, even with the READ_PHONE_STATE permission, can no longer access the IMEI.

2. Serial Number

  • The serial number is also restricted. Before Android 8 (Oreo), applications could retrieve it via Build.SERIAL.

  • Since Android 8, accessing the serial number requires the READ_PHONE_STATE permission.

  • From Android 10 onward, applications cannot access the serial number unless they are system applications.

A system application is one installed directly in the system partition of an Android device. It is an integral part of the operating system (directly integrated by the manufacturer into the OEM firmware) and enjoys special privileges that standard applications (installed by users) do not have.

Installing an application as a system app is technically possible. However, it involves specific conditions and technical skills:

  • Root Access Required: The target device must be rooted to allow access to and modification of the system partition, where system applications are installed.

  • Using ADB: The method requires basic knowledge of using the Android Debug Bridge (ADB) tool to properly copy and configure the APK in the system directory of the device.

We are fully aware of the limitations imposed by Android regarding access to sensitive information (such as the IMEI or serial number) from the inventory agent.

To address these constraints and ensure proper data reporting from the agent, we are currently exploring several alternative approaches, including:

  • Collaboration with Manufacturers (OEMs): We are considering partnerships with manufacturers to integrate our application directly into the firmware as a system application, which would allow access to the necessary APIs.

  • Obtaining the Required Permissions from Google: We are analyzing procedures to acquire special permissions (such as READ_PRIVILEGED_PHONE_STATE) while complying with Google’s privacy and security policies.

  • Alternative Technical Solutions: We are also exploring technical approaches such as using administrator profiles through Android Enterprise or using non-sensitive identifiers that could replace the IMEI or serial number for our specific requirements.


Install the plugin

  • Go to the marketplace. Download and install the Agent config plugin.

images/install_plugin.png

Setting up the plugin

In Setup > General > GLPI Agent Contiguration, select the options you want :

  • By default, the URL of the inventory is indicated

  • To secure your instance and limit feedback from your mobile devices, you can enter a login and password for each mobile device to be inventoried

  • You can use a tag entity (choose Yes and indicate your tag if needed)

  • Choose the asset type by default (computers or phones, this information indicates the type of device by default, but can be modified individually from each device)

  • Display QR Code (on central page)

  • Display Deeplink (on central page)

  • Manage automatic inventory and frequency for android

images/setup_plugin.png

Central page

  • On Home > GLPI Agent Config use Deep link or QR Code to preconfigure the agent :

images/asset.png

When a factory reset is performed on the phone, the serial number automatically generated by the agent changes You can use Deep Link / QR Code to configure the agent with the serial number previously generated and inventoried in GLPI.

Create the OAuth Client

In GLPI, create a new OAuth client dedicated to the Android Inventory Agent.

Configure the following grants:

  • Client Credentials

  • Authorization Code

Configure the following scope:

  • Inventory

Using a dedicated OAuth client makes it possible to limit the permissions granted to the Android Inventory Agent to the operations required for inventory management.

Configure the Android Inventory Agent Plugin

Once the OAuth client has been created, configure the Android Inventory Agent plugin to use this OAuth client.

Select the OAuth client created in the previous step and save the configuration.

Configure the Inventory

Configure the inventory settings to explicitly indicate that the inventory must use the OAuth client for authentication.

Make sure that the Oauth - Client credentials authentication option is enabled.

Configure the Android Inventory Agent

The configuration can now be distributed to the Android Inventory Agent using the generated QR code.

Simply scan the QR code using the Android Inventory Agent application.

Once the QR code has been scanned, the application will automatically retrieve the OAuth configuration and use the dedicated OAuth client to authenticate with GLPI.

The Android Inventory Agent is then ready to perform inventory operations against your GLPI instance.

Security considerations

The QR code and deep link generated by the Android Inventory Agent plugin may contain the OAuth client_id and client_secret required to authenticate the agent.

For security reasons, access to this information is now protected by a dedicated permission in the Android Inventory Agent plugin.

Access to the QR code and deep link from the GLPI home page is restricted as follows:

  • Self-Service profiles do not have access to the QR code or deep link.

  • Other profiles must have the dedicated permission enabled to access the QR code or deep link.

  • Access to these credentials should only be granted to trusted users who are authorized to configure Android Inventory Agents.

This permission should therefore be granted according to the principle of least privilege, as the QR code / deep link may expose OAuth credentials in plain text.

Make sure that only authorized users have access to the generated QR code or deep link and avoid sharing them through untrusted channels.

Last updated