CIPP icon indicating copy to clipboard operation
CIPP copied to clipboard

Apply Administrative templates failes with ODataType value error

Open ralphwestland-sijn opened this issue 2 years ago • 3 comments

Description

We want to report a BUG when apply a Administrative Template with user and device policy. We use Frontend 2.10.0 and Backend 1.15.2

We created a new template from Tennant A. Next action is apply this template to Tennant B. We try to apply a Administrative template The RAW Json code is; {"added":[{"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('81c07ba0-7512-402d-b1f6-00856975cfab')","enabled":true,"presentationValues":[{"id":null,"value":[],"@odata.type":null,"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('81c07ba0-7512-402d-b1f6-00856975cfab')/presentations('')"}]},{"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('a1a8aec9-6ec8-470a-8f92-067286a70140')","enabled":true,"presentationValues":[{"id":"a9cbd9e8-ae43-4f21-982c-6957d1e9c029","value":14,"@odata.type":"#microsoft.graph.groupPolicyPresentationValueDecimal","[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('a1a8aec9-6ec8-470a-8f92-067286a70140')/presentations('2c7abccd-4c87-40fb-be53-e4dcc896838a')"}]},{"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('30ae1c5f-bbda-4e4c-945c-1b127f5f897f')","enabled":false,"presentationValues":[{"id":null,"value":[],"@odata.type":null,"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('30ae1c5f-bbda-4e4c-945c-1b127f5f897f')/presentations('')"}]},{"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('7d3a773d-3723-4545-97fb-27695b453215')","enabled":true,"presentationValues":[{"id":null,"value":[],"@odata.type":null,"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('7d3a773d-3723-4545-97fb-27695b453215')/presentations('')"}]},{"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('b00170dc-ffa9-4c0f-8c7c-294f7068a38f')","enabled":true,"presentationValues":[{"id":null,"value":[],"@odata.type":null,"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('b00170dc-ffa9-4c0f-8c7c-294f7068a38f')/presentations('')"}]},{"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('7d5a17ca-3d3c-4eaa-b7e5-2f6b09295b34')","enabled":true,"presentationValues":[{"id":"94c1c64f-c9db-42d3-86ba-5fbe58540d84","value":false,"@odata.type":"#microsoft.graph.groupPolicyPresentationValueBoolean","[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('7d5a17ca-3d3c-4eaa-b7e5-2f6b09295b34')/presentations('86955180-8a03-4b6a-94ac-aa00344e410e')"}]},{"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('abeb6a60-4d1c-459f-9d8f-38f9feb83536')","enabled":false,"presentationValues":[{"id":null,"value":[],"@odata.type":null,"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('abeb6a60-4d1c-459f-9d8f-38f9feb83536')/presentations('')"}]},{"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('d77c2b68-149c-40e0-878e-4fe56b99222f')","enabled":false,"presentationValues":[{"id":"385fc7a4-b425-451c-896e-845eba58834c","value":"2","@odata.type":"#microsoft.graph.groupPolicyPresentationValueText","[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('d77c2b68-149c-40e0-878e-4fe56b99222f')/presentations('3b927b08-6bc8-4d4e-a479-26b607813765')"}]},{"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('164f9cda-4b86-46fe-b738-6c546a4b36d3')","enabled":true,"presentationValues":[{"id":null,"value":[],"@odata.type":null,"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('164f9cda-4b86-46fe-b738-6c546a4b36d3')/presentations('')"}]},{"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('a60685f1-3c82-4c85-aacf-7ec547e0e168')","enabled":true,"presentationValues":[{"id":null,"value":[],"@odata.type":null,"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('a60685f1-3c82-4c85-aacf-7ec547e0e168')/presentations('')"}]},{"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('2daec783-9596-4947-8592-87deff63d3fa')","enabled":true,"presentationValues":[{"id":null,"value":[],"@odata.type":null,"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('2daec783-9596-4947-8592-87deff63d3fa')/presentations('')"}]},{"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('b7165b6d-6642-4f75-88e9-9551e30b580b')","enabled":true,"presentationValues":[{"id":null,"value":[],"@odata.type":null,"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('b7165b6d-6642-4f75-88e9-9551e30b580b')/presentations('')"}]},{"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('dd15a0a6-bffa-4db6-8019-a7f5d317bfd3')","enabled":true,"presentationValues":[{"id":null,"value":[],"@odata.type":null,"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('dd15a0a6-bffa-4db6-8019-a7f5d317bfd3')/presentations('')"}]},{"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('9a4db949-29e4-4e31-a129-bf2b88d8fa1b')","enabled":true,"presentationValues":[{"id":null,"value":[],"@odata.type":null,"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('9a4db949-29e4-4e31-a129-bf2b88d8fa1b')/presentations('')"}]},{"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('96f51922-9612-4634-8f34-ded15638f95e')","enabled":true,"presentationValues":[{"id":null,"value":[],"@odata.type":null,"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('96f51922-9612-4634-8f34-ded15638f95e')/presentations('')"}]},{"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('2e34d8a2-266b-4cb0-b0bc-e26381d849f4')","enabled":true,"presentationValues":[{"id":null,"value":[],"@odata.type":null,"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('2e34d8a2-266b-4cb0-b0bc-e26381d849f4')/presentations('')"}]},{"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('1da8d319-6a13-4e6c-893c-e7105e361867')","enabled":true,"presentationValues":[{"id":null,"value":[],"@odata.type":null,"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('1da8d319-6a13-4e6c-893c-e7105e361867')/presentations('')"}]},{"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('7ab3839d-2ea4-413c-93bd-ed0143133b70')","enabled":true,"presentationValues":[{"id":null,"value":[],"@odata.type":null,"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('7ab3839d-2ea4-413c-93bd-ed0143133b70')/presentations('')"}]},{"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('6fd59dc3-53ff-4b17-8fed-ed0f25c8897f')","enabled":false,"presentationValues":[{"id":null,"value":[],"@odata.type":null,"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('6fd59dc3-53ff-4b17-8fed-ed0f25c8897f')/presentations('')"}]},{"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('be101b8a-f229-4ff6-ab69-eda63f199b56')","enabled":true,"presentationValues":[{"id":null,"value":[],"@odata.type":null,"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('be101b8a-f229-4ff6-ab69-eda63f199b56')/presentations('')"}]},{"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('a8562e92-0483-4466-9a1f-f813935640c2')","enabled":false,"presentationValues":[{"id":null,"value":[],"@odata.type":null,"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('a8562e92-0483-4466-9a1f-f813935640c2')/presentations('')"}]},{"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('4e8220aa-8cfb-47ea-ab17-f876952f404a')","enabled":false,"presentationValues":[{"id":null,"value":[],"@odata.type":null,"[email protected]":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('4e8220aa-8cfb-47ea-ab17-f876952f404a')/presentations('')"}]}],"updated":[],"deletedIds":[]}

The template is applied to User All User and Devices. The error we receive “Failed to add policy for xxxxx.cloud: The request is malformed or incorrect: expected a string for ODataType value.” We tested with different Administrative templates and they all fail with the above error..

Environment data

CPP Hosted version, Azure Hosted version

ralphwestland-sijn avatar Aug 09 '22 10:08 ralphwestland-sijn

Thank you for creating a bug. Please make sure your bug is indeed a unique case by checking current and past issues, and reading the complete documentation at https://kelvintegelaar.github.io/CIPP If your bug is a known documentation issue, it will be closed without notice by a contributor. To confirm that this is not a bug found in the documentation, please copy and paste the following comment: "I confirm that I have checked the documentation thoroughly and believe this to be an actual bug.".

Without confirming, your report will be closed in 24 hours. If you'd like this bug to be assigned to you, please comment "I would like to work on this please!".

github-actions[bot] avatar Aug 09 '22 10:08 github-actions[bot]

I confirm that I have checked the documentation thoroughly and believe this to be an actual bug

Van: github-actions[bot] @.> Verzonden: dinsdag 9 augustus 2022 12:33 Aan: KelvinTegelaar/CIPP @.> CC: Ralph Westland @.>; Author @.> Onderwerp: Re: [KelvinTegelaar/CIPP] Apply Administrative templates faile with ODataType value error (Issue #1063)

Thank you for creating a bug. Please make sure your bug is indeed a unique case by checking current and past issues, and reading the complete documentation at https://kelvintegelaar.github.io/CIPP If your bug is a known documentation issue, it will be closed without notice by a contributor. To confirm that this is not a bug found in the documentation, please copy and paste the following comment: "I confirm that I have checked the documentation thoroughly and believe this to be an actual bug.".

Without confirming, your report will be closed in 24 hours. If you'd like this bug to be assigned to you, please comment "I would like to work on this please!".

— Reply to this email directly, view it on GitHubhttps://github.com/KelvinTegelaar/CIPP/issues/1063#issuecomment-1209206298, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A2H7YTBYAAFZ5SD6B34VT6LVYIXUZANCNFSM56AINQUQ. You are receiving this because you authored the thread.Message ID: @.@.>>

ralphwestland-sijn avatar Aug 09 '22 10:08 ralphwestland-sijn

Great! I assigned you (@ralphwestland-sijn) to the issue. Have fun working on it!

github-actions[bot] avatar Aug 09 '22 10:08 github-actions[bot]

We are experiencing the same issue, seems a not fully working fixing of issue #1047

FYI: it only happens with Administrative templates.

xhoy avatar Aug 15 '22 09:08 xhoy

Completely missed this, won't make it into this release but the next one.

KelvinTegelaar avatar Aug 19 '22 08:08 KelvinTegelaar

This issue is stale because it has been open 10 days with no activity. We will close this issue soon. If you want this feature implemented you can contribute it. See: https://cipp.app/GettingStarted/Contributions/ . Please notify the team if you are working on this yourself.

github-actions[bot] avatar Aug 29 '22 02:08 github-actions[bot]

This issue is stale because it has been open 10 days with no activity. We will close this issue soon. If you want this feature implemented you can contribute it. See: https://cipp.app/GettingStarted/Contributions/ . Please notify the team if you are working on this yourself.

Not stale :) still broken (:

xhoy avatar Aug 30 '22 09:08 xhoy

Fixed in dev

KelvinTegelaar avatar Sep 05 '22 09:09 KelvinTegelaar