Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to remove template: Cannot validate argument on parameter 'Entity'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again. #2118

Closed
jmv-support opened this issue Feb 8, 2024 · 13 comments
Labels
bug Something isn't working unconfirmed-by-user

Comments

@jmv-support
Copy link

Description

There's an issue with removing templates from Intune/Device Management.

Steps to reproduce:

1: Go to Intune/Device Management/Policy Templates
2: Select a policy and click on the View icon to see the JSON.
3: Copy the JSON displayed here
4: Go to Intune/Device Management/Add Policy Template
5: Enter a display name, a description and select a policy Type (they all have the same effect). In this case I selected the Settings Catalog since that was the JSON I copied.
6: Paste the copied Raw JSON from step 3
7: Click Add Template. "Successfully added template" will appear at the top of the screen.
8: Go to Intune/Device Management/Policy Templates
9: Select the policy created in 5.
10: Press the Delete icon.
11: Press the Continue button on the "Do you want to delete the template?" dialog.
12: An error message appears: Failed to remove template: Cannot validate argument on parameter 'Entity'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.

Going in from this point:

13: Click the View icon on the policy created in step 5
14: Click 'Save Changes' and see the "Successfully saved the template" message. Close the dialog
15: Press the Delete icon on the same policy created in step 5
16: Press the Continue button on the "Do you want to delete the template?" dialog.
17: A success message appears: "Successfully removed Intune Template"

The template is NOT removed from the list. Trying to repeat from step 10 results in the same sequence.

Is this related to #1750?

Environment data

Sponsored / Hosted
Front end version number: 5.1.1
Back end version number: 5.1.1
Tried Tenant Cache Clear: true
Tried Token Cache Clear: true
@jmv-support jmv-support added bug Something isn't working unconfirmed-by-user labels Feb 8, 2024
Copy link

github-actions bot commented Feb 8, 2024

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://docs.cipp.app/
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!".

@jmv-support
Copy link
Author

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

@jmv-support
Copy link
Author

Speaking of documentation: All the links from that Intune section (excluding Devices) result in a Page not found because the app has 'MEM' in the url, the documentation is found under 'mem'. Apparently the documentation is on a case sensitive link.

@DanielWahlgren
Copy link

I have the same issue, so it is not unique to your environment. Also on 5.1.1

Copy link

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://docs.cipp.app/dev-documentation/contributing-to-the-code . Please notify the team if you are working on this yourself.

@jmv-support
Copy link
Author

So when 'bugs' are ignored, they become 'features' and you're on your own and need to solve the issues yourself? Weird way of working....
The reply you need to send back that you confirm that this is a bug is weird as well. But I think that bot explained it well: CIPP is flawless and everything a user does is a bug: the first thing it says: Thank you for creating a bug.

@DanielWahlgren
Copy link

My issue seems to be with only one template. It doesn't have a GUID in RowKey in the storagetable.
I havn't been able to add a guid to the table, so there are two things we can do:
If you want to work with the policy properly, genereate a new GUID in your preferred way (new-guid in powershell for example), edit the policy in CIPP and set "GUID": "Your-generated-guid" and save changes. This will create a working copy.

To remove the broken template, you must do so by going to your azure storage for cipp, find the template in the tables -> templates list, and delete it. It should be fairly easy to find as it will lack a RowKey.

I think this should pobably be handled by CIPP automatically if found in a broken state like this.

@jmv-support
Copy link
Author

Thanks for the suggestion, I'll give it a go.

To be honest, the template is created by CIPP (I only added the json) so I would expect either a working, deployable template or the correct checks before creating it. Even if I copy it from an existing one, this error occurs so somewhere along the line something goes wrong.

@KelvinTegelaar
Copy link
Owner

Solved in dev

@jmv-support
Copy link
Author

Bedankt Kelvin! Much appreciated!

@lraikhman
Copy link

I have this exact problem on the hosted Cyberdrain instance, and obviously can't access the backend as suggested by @DanielWahlgren.

How can I raise a support case?

@axxs
Copy link

axxs commented Jul 30, 2024

I also have this problem on a hosted instance, but with transport rule templates.

@jonmonsystems
Copy link

I have this problem with my hosted instance when trying to modify or remove Intune templates that were built in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unconfirmed-by-user
Projects
Status: Done
Development

No branches or pull requests

6 participants