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
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/adeSource: Iru API: List ADE integrations
Pull the devices for one token
The call returns the devices associated with the
ade_token_idyou pass, with their enrollment status. It returns 300 device records per page. Use thenextkey or thepageparameter to read every page.GET/api/v1/integrations/apple/ade/{ade_token_id}/devicesSeparate enrolled from waiting devices
When
mdm_deviceisnull, the device is awaiting enrollment. Whenmdm_devicehas data, the device is enrolled.Each result also names its token in
dep_account, with the tokenidandserver_name.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
Check it worked
- Each device's
dep_accountmatches 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_routingis true andblueprint_idis null, so don't read a nullblueprint_idas 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.