Azure / AVDSessionHostReplacer

MIT License
33 stars 19 forks source link

Include the option to also remove the Intune object #9

Closed jpplaisier closed 1 month ago

jpplaisier commented 3 months ago

Currently our Entra ID joined, Intune managed AVD session hosts are cleaned up only in Entra ID. I also would like to have an option to also delete the object in Intune.

joshbasquez commented 2 months ago

https://github.com/Azure/AVDSessionHostReplacer/pull/11

Added fix, Submitted pull request above to Willy. He has an additional step to grant the managed identity permissions to remove device in entra. May require additional step to grant intune devices read/write permissions to the managed identity as well, I will test when I get a chance so I can update his permissions script.

WillyMoselhy commented 2 months ago

In my testing I only needed to clean the object in Entra ID, and creating a new device with same name works. Why do we need to delete it in Intune?

jpplaisier commented 2 months ago

Strange, because in my Intune tenant I see lots of duplicate device records in Intune

WillyMoselhy commented 1 month ago

Added in v.0.2.8