[GH-ISSUE #4677] [Bug]: Applying a "App Protection Policy" to "All users" results in errors #2172

Closed
opened 2026-03-02 13:50:12 +03:00 by kerem · 2 comments
Owner

Originally created by @PeterVive on GitHub (Sep 23, 2025).
Original GitHub issue: https://github.com/KelvinTegelaar/CIPP/issues/4677

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

  1. Find an "App Protection Policy" (either iOS or Android) and convert to a template.
  2. Apply the template in a Standard as such, selecting "Assign to all users":
Image
  1. This results in the policies being created but not assigned to anyone, with repeated attempts on subsequent runs.

Environment Type

Sponsored (paying) user

Front End Version

8.4.2

Back End Version

8.4.2

Relevant Logs / Stack Trace

The logbook shows the following error when the assignment fails:
Failed to assign allLicensedUsers to Policy T_8b6230ab-81e4-4829-88f7-f19b8930fbde, using Platform deviceAppManagement and iosManagedAppProtections. The error is:{ "_version": 3, "Message": "Unsupported AssignmentTarget. Group assignments contain classes other than GroupAssignmentTarget and ExclusionGroupTarget - Operation ID (for customer support): 00000000-0000-0000-0000-000000000000 - Activity ID: d05d14d5-6168-4e31-ac37-dd8a837f35cd - Url: https://proxy.msub09.manage.microsoft.com/MAMAdmin_2509/MAMAdminFEService/deviceAppManagement/iosManagedAppProtections('T_8b6230ab-81e4-4829-88f7-f19b8930fbde')/microsoft.management.services.api.assign?api-version=5025-07-01", "CustomApiErrorPhrase": "", "RetryAfter": null, "ErrorSourceService": "", "HttpHeaders": "{}" }
Originally created by @PeterVive on GitHub (Sep 23, 2025). Original GitHub issue: https://github.com/KelvinTegelaar/CIPP/issues/4677 ### Required confirmations before submitting - [x] **I can reproduce this issue on the latest released versions** of both CIPP and CIPP-API. - [x] **I have searched existing issues** (both open and closed) to avoid duplicates. - [x] I am **not** requesting general support; this is an actual bug report. ### Issue Description 1. Find an "App Protection Policy" (either iOS or Android) and convert to a template. 2. Apply the template in a Standard as such, selecting "Assign to all users": <img width="1449" height="1178" alt="Image" src="https://github.com/user-attachments/assets/fe48b877-36da-45b6-afcf-6fbb83f79f74" /> 3. This results in the policies being created but not assigned to anyone, with repeated attempts on subsequent runs. ### Environment Type Sponsored (paying) user ### Front End Version 8.4.2 ### Back End Version 8.4.2 ### Relevant Logs / Stack Trace ```plaintext The logbook shows the following error when the assignment fails: Failed to assign allLicensedUsers to Policy T_8b6230ab-81e4-4829-88f7-f19b8930fbde, using Platform deviceAppManagement and iosManagedAppProtections. The error is:{ "_version": 3, "Message": "Unsupported AssignmentTarget. Group assignments contain classes other than GroupAssignmentTarget and ExclusionGroupTarget - Operation ID (for customer support): 00000000-0000-0000-0000-000000000000 - Activity ID: d05d14d5-6168-4e31-ac37-dd8a837f35cd - Url: https://proxy.msub09.manage.microsoft.com/MAMAdmin_2509/MAMAdminFEService/deviceAppManagement/iosManagedAppProtections('T_8b6230ab-81e4-4829-88f7-f19b8930fbde')/microsoft.management.services.api.assign?api-version=5025-07-01", "CustomApiErrorPhrase": "", "RetryAfter": null, "ErrorSourceService": "", "HttpHeaders": "{}" } ```
Author
Owner

@github-actions[bot] commented on GitHub (Sep 23, 2025):

Thank you for reporting a potential bug. If you would like to work on this bug, please comment:

I would like to work on this please!

Thank you for helping us maintain the project!

<!-- gh-comment-id:3324889869 --> @github-actions[bot] commented on GitHub (Sep 23, 2025): Thank you for reporting a potential bug. If you would like to work on this bug, please comment: > I would like to work on this please! Thank you for helping us maintain the project!
Author
Owner

@KelvinTegelaar commented on GitHub (Sep 23, 2025):

App Protection policies cannot be assigned to the default virtual groups, you have to assign these to actual groups.

!support

<!-- gh-comment-id:3324893428 --> @KelvinTegelaar commented on GitHub (Sep 23, 2025): App Protection policies cannot be assigned to the default virtual groups, you have to assign these to actual groups. !support
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/CIPP#2172
No description provided.