> For the complete documentation index, see [llms.txt](https://docs.intuneassistant.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.intuneassistant.cloud/extensions/worker/manage-jobs/poisoned-jobs.md).

# Poisoned jobs

## What is a poisoned job?

When a job fails, the Worker will try again the next time it is scheduled. But if a job **fails 3 times in a row**, IntuneAssistant concludes that something is structurally wrong — not just a temporary hiccup — and automatically marks the job as **poisoned**.

A poisoned job is:

* **Stopped** — it will not run again automatically
* **Locked** — it cannot be triggered manually either
* **Flagged** — it is visually marked in the portal so you can find it quickly

This is a safety mechanism. Without it, a broken job would keep failing on every scheduled run, sending error notifications indefinitely and consuming Worker resources.

{% hint style="warning" %}
A poisoned job does **not** delete your configuration or data. Everything is preserved. You just need to fix the underlying issue and reset the job to get it running again.
{% endhint %}

***

## How do I know a job is poisoned?

In the IntuneAssistant portal under **Worker → Jobs**, poisoned jobs are shown with a red **Poisoned** badge instead of the normal Enabled/Disabled indicator.

On the job detail page you will also see:

* **Status:** Poisoned
* **Consecutive failures:** 3 (or more)
* **Last failure:** the date and time of the most recent failed run

***

## Why did my job get poisoned?

Open the job in the portal and go to the **Execution History** tab. Look at the last 3 failed executions — each one has an **Error Message** field that describes what went wrong.

Common causes:

| Symptom in error message       | Likely cause                                                                     |
| ------------------------------ | -------------------------------------------------------------------------------- |
| `RecipientEmail is required`   | The recipient email address is missing or was cleared from the job configuration |
| `Failed to fetch audit events` | The Worker lost access to the tenant — consent may have expired                  |
| `Graph API 403 Forbidden`      | Missing Microsoft Graph permissions — re-grant consent in IntuneAssistant        |
| `Invalid job configuration`    | The job configuration JSON is malformed or incomplete                            |
| `No drifts baseline found`     | Configuration Drift job has no baseline snapshot to compare against              |

***

## How to fix a poisoned job

{% stepper %}
{% step %}

### Step 1 — Find the error

1. Open the job from **Worker → Jobs**
2. Click the **Execution History** tab
3. Open the most recent failed execution
4. Read the **Error Message** — this tells you exactly what went wrong
   {% endstep %}

{% step %}

### Step 2 — Fix the root cause

Fix the issue before resetting the job. If you reset without fixing, the job will simply fail again and become poisoned once more.

{% tabs %}
{% tab title="Wrong email address" %}

1. On the job detail page, click **Edit**
2. Update the **Recipient Email** field with a valid address
3. Save the job — this automatically resets the poisoned status
   {% endtab %}

{% tab title="Consent / permissions expired" %}

1. Go to **Settings → Tenants** in the IntuneAssistant portal
2. Find the affected tenant
3. Click **Re-grant Consent** and complete the Microsoft sign-in flow
4. Return to your job and reset it (see Step 3)
   {% endtab %}

{% tab title="Misconfigured job settings" %}

1. On the job detail page, click **Edit**
2. Review all configuration fields — check email addresses, tenant ID, and any filters
3. Correct the values and save
   {% endtab %}
   {% endtabs %}
   {% endstep %}

{% step %}

### Step 3 — Reset the job

Once the root cause is fixed, reset the job to clear the poisoned status:

1. Open the job in the portal
2. Click **Edit**
3. Make any necessary corrections (or simply re-save if the fix was made elsewhere)
4. Save the job

The job will return to **Enabled** status and be scheduled for its next run immediately.

{% hint style="success" %}
After saving, check the job detail page to confirm the status shows **Enabled** and a new **Next Scheduled Run** time is set. The consecutive failure counter will be back to 0.
{% endhint %}
{% endstep %}
{% endstepper %}

***

## Frequently asked questions

<details>

<summary>Can I manually trigger a poisoned job?</summary>

No. The **Run Now** button is disabled for poisoned jobs. You must reset the job first.

</details>

<details>

<summary>Will I lose my job history?</summary>

No. All previous execution records are preserved, including the failed runs that caused the job to become poisoned.

</details>

<details>

<summary>What if the job gets poisoned again right after I reset it?</summary>

That means the root cause has not been fully resolved. Go back to the execution history, check the new error message, and address the issue before resetting again.

</details>

<details>

<summary>Can I delete a poisoned job and recreate it?</summary>

Yes, but resetting it is simpler — you keep your existing configuration and history. Only delete the job if you want to start completely fresh.

</details>

***

## Need Help?

If you cannot identify the cause from the error message, contact support with:

* Your **Worker instance ID** (visible on the Worker dashboard)
* The **Job ID** (visible in the job detail URL)
* The **error message** from the failed execution

**<support@intuneassistant.cloud>**
