Skip to content
All recipes

Find out why a Library Item failed on one device

Read a device's Library Item status and logs, then the item's activity log, to see why the item shows an error on that device.

Open in Claude Open in ChatGPT
Product
Endpoint Management
Platforms
All device types
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).
  • The device ID and the name of the Library Item that failed.

Prompt for your agent

List the Library Items on the device with ID [device ID] using GET /api/v1/devices/{device_id}/library-items. Find [Library Item name] and show me its status, reported_at, log, last_audit_run, last_audit_log, control_log and item_id. Tell me which of these fields hold text about the failure. Then read that item's activity with GET /api/v1/library/library-items/{library_item_id}/activity, using the item_id from the first call. Show me every entry from newest to oldest with its activity_type, activity_time and user_email, and point out any edit or assignment change made shortly before the failure.

Steps

  1. Read the item's status on the device

    The call returns every Library Item on the device with its status, log, last_audit_run, last_audit_log, control_log and item_id. A failed audit shows as ERROR, and a configuration profile that failed to install shows as failed.

    The log fields in the example are empty, so have the agent say which field held the failure text.

    GET/api/v1/devices/{device_id}/library-items

    Source: Iru API: Get Device Library Items

  2. Read the item's activity log

    Activity comes back from newest to oldest. The activity_type values are library_item_created, library_item_edited, library_item_deleted, library_item_duplicated and library_item_assignment_changed, and each entry names the user who made the change.

    Use this log to find out whether someone edited the item or changed its assignment before the failure.

    GET/api/v1/library/library-items/{library_item_id}/activity

    Source: Iru API: Get Library Item Activity

  3. Compare with the Status tab

    In the web app, open the Library Item, select the Status tab and expand the device to see its last install status, including Last Audit, Last Install and the associated errors.

    Source: Library Item Status Activity Timeline

  4. Retry after you fix the cause

    Some Library Items stop after a failed install. Once you have resolved the cause, select Flush next to the device on the Status tab and Iru attempts the installation again. Flush applies to Apple devices.

    Source: Using the Flush Action

Common pitfalls

  • The activity log records changes to the item itself, such as edits and assignment changes. The device's own status and log fields hold the failure details.
  • An Error status generates an alert, so check Alerts in the top navigation for the matching entry.
  • Flush only after you have identified and resolved the cause, or the install fails again.

FAQ

Which API call shows a Library Item's status on one device?

GET /api/v1/devices/{device_id}/library-items returns every Library Item on the device with its status and log fields.

What does the Library Item activity log show?

GET /api/v1/library/library-items/{library_item_id}/activity lists changes to the item from newest to oldest, such as edits and assignment changes.

What happens when a Library Item fails?

The item shows Error status on the device and Iru generates an alert.

How do I retry a failed Library Item?

After you resolve the cause, select Flush next to the device on the item's Status tab. Flush applies to Apple devices.

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.