red5coder / Jamf-Protect-Batch-Delete

App to perform batch deletion of computer records in Jamf Protect
MIT License
12 stars 1 forks source link

Deleting by .csv import not working #3

Open itsbradwhite opened 1 month ago

itsbradwhite commented 1 month ago

When importing a list of serial numbers and deleting that way:

Screenshot 2024-07-16 at 7 50 31 PM

It doesn't appear to be working. I get a message that the deletion was successful, but the computer count in Jamf Protect does not change at all.

I tested fetching a list of computers that haven't checked-in in X amount of days to delete that way, and that worked for me. The computer count in Jamf Protect decreased almost instantly.

So it seems like just the deletion by .csv import method isn't working.

Seeing many errors in the logs when doing .csv deletion:

Screenshot 2024-07-16 at 8 15 09 PM

red5coder commented 1 month ago

Thanks for the update. Will investigate for you

red5coder commented 1 month ago

Hi there

I just tried a csv file my side with v0.9.2 and it did indeed delete the computers.

The only difference I'm a test instance with only a few divices.

My csv file just had 5 serial numbers in it.

What happens if you have a csv file with a couple of serial numbers? Still get the same result? Also can you just delete a device when you fetch the computers in app?

itsbradwhite commented 1 month ago

Very strange. Yeah even just doing a single one as a test produced the same behavior for me.

Screenshot 2024-07-24 at 5 03 06 PM

Screenshot 2024-07-24 at 5 01 12 PM

If I fetch in the app, it does delete. It's just from .csv that isn't working. Says it's successful, doesn't delete.

I ended up writing a python script that deletes from .csv. I'm using the exact same known working client ID and password I did with that for testing this app.

So I'm technically good on this now, but I'm happy to continue testing if at all helpful for you.

red5coder commented 1 month ago

Could you send me a sample csv file over, feel free to change the serial number to a fake one, but interested in whats going on. The last error with the "could not decode" I cannot reproduced. Really strange.