[Bug]: Policy loses package association after template sync in Golden Tenant

Required confirmations before submitting

  • I can reproduce this issue on the latest released versions of both CIPP and CIPP-API.

    I have searched existing issues (both open and closed) to avoid duplicates.

    I am not requesting general support; this is an actual bug report.

Issue Description

When using the Template Library with a Golden Tenant, policies lose their package association after a subsequent sync/run. The policy itself is updated/overwritten correctly, but CIPP no longer knows which package it belongs to.

Steps to Reproduce

  1. Go to Template Library in CIPP.

  2. Connected with an Golden Tenant.

  3. Create (or select) a Package that contains at least one policy.

  4. In the Golden Tenant, assign/link the policy to the package (one-time add).

  5. Trigger a policy run/sync (e.g., apply templates to the Golden Tenant or run the scheduled job).

  6. After the run completes, open Template Library → Packages and/or the policy detail.

  7. Observe: the policy still exists and was overwritten as expected, but the UI no longer shows the package association (the policy “forgets” which package it belongs to).

Expected Behavior

  • After each run/sync, the policy remains linked to the same package it was originally assigned to.

  • The package → policy relationship is visible/consistent in the UI and export endpoints.

Actual Behavior

  • The policy is updated/overwritten correctly, but loses its package association.

  • In the UI, the policy no longer appears under the package; the package → policy mapping is missing.

Environment Type

Sponsored (paying) user

Front End Version

v8.6.1

Back End Version

v8.6.1

Relevant Logs / Stack Trace

Please authenticate to join the conversation.

Upvoters
Status

Released

Board

Bug / Fix

Date

4 months ago

Author

Kelvin Tegelaar

Subscribe to post

Get notified by email when there are changes.