Skip to content
All recipes

List the devices on each ADE token

List your ADE tokens, then pull the devices tied to each one with their enrollment state.

Open in Claude Open in ChatGPT
Product
Endpoint Management
Platforms
Apple devices
Effect
Read-only
Agent access
Iru MCP or the Iru API

Before you start

  • An Iru API token with MCP turned on and permissions that cover the calls below (recipe 1).
  • More than one ADE token is only possible when you added the extra tokens through the Iru API (Configure multiple ADE tokens). With one token, the recipe still works and returns one group.

Prompt for your agent

List my ADE integrations in Iru with GET /api/v1/integrations/apple/ade. For each token, show me its server_name and tell me which field holds the token ID. Then, for each token, call GET /api/v1/integrations/apple/ade/{ade_token_id}/devices and page through every result. Give me one table per token with each device's serial_number, model, profile_status and whether mdm_device is null.

Steps

  1. List the ADE tokens

    Have the agent list each ADE integration with its server_name. The next call needs each token's ID, so have the agent name the field it took the ID from.

    GET/api/v1/integrations/apple/ade

    Source: Iru API: List ADE integrations

  2. Pull the devices for one token

    The call returns the devices associated with the ade_token_id you pass, with their enrollment status. It returns 300 device records per page. Use the next key or the page parameter to read every page.

    GET/api/v1/integrations/apple/ade/{ade_token_id}/devices

    Source: Iru API: List devices associated to ADE token

  3. Separate enrolled from waiting devices

    When mdm_device is null, the device is awaiting enrollment. When mdm_device has data, the device is enrolled.

    Each result also names its token in dep_account, with the token id and server_name.

    Source: Iru API: List devices associated to ADE token

  4. Repeat for each token

    Run the same call once per token and keep the results grouped by server_name, so you can tell which Apple Business or Apple School Manager account each device came from.

    GET/api/v1/integrations/apple/ade/{ade_token_id}/devices

    Source: Iru API: List devices associated to ADE token

Check it worked

  • Each device's dep_account matches the token you asked for.

Common pitfalls

  • The web app shows one ADE token on its Apple integrations page. Read the other tokens through the API.
  • With Blueprint Routing on, use_blueprint_routing is true and blueprint_id is null, so don't read a null blueprint_id as unassigned.
  • A token that expired no longer syncs devices from Apple Business or Apple School Manager. It stops syncing new devices.

FAQ

Which API call lists the devices on one ADE token?

GET /api/v1/integrations/apple/ade/{ade_token_id}/devices returns the devices associated with that token and their enrollment status.

How many devices come back per page?

300 device records per page. Use page, or the next and previous keys, to move between pages.

How do I find a token's ID?

GET /api/v1/integrations/apple/ade lists your ADE integrations. The prompt has the agent name the field it took the ID from, since the docs excerpt doesn't show it.

Can I add more than one ADE token?

Yes. Add extra tokens with the Iru API, because the web app shows only the latest token on the Apple integrations page.

Next steps

Sources

Stay up to date

Iru's bi-weekly collection of articles, videos, and research to keep IT & Security teams ahead of the curve.