mahmoud_shabban
Mar 16, 2023Former Employee
Status:
Closed
AAD Computer object cleanup after removing from the AVD Host Pool
is there a possibility to clean up the object Ids from the Azure active directory after deleting the related session host from the host pool?
Supernova
Mar 16, 2023Copper Contributor
Yes, you can clean up the object IDs from Azure Active Directory (Azure AD) after deleting the related session host from the host pool. Here's how you can do it:
- Open the Azure Portal and go to Azure Active Directory.
- In the left-hand menu, select "Enterprise applications".
- Find the enterprise application that corresponds to your session host and click on it to open its overview page.
- In the "Users and groups" section, select the user account associated with the deleted session host and click on "Remove".
- Confirm that you want to remove the user from the enterprise application by clicking "Yes".
- Repeat steps 4-5 for all user accounts associated with the deleted session host.
- After removing all users, click on "Properties" in the left-hand menu.
- Under "Application lifecycle", click on "Delete" to remove the enterprise application from Azure AD.
- Confirm that you want to delete the application by clicking "Yes".
By deleting the enterprise application, you will also remove the corresponding object IDs from Azure AD. This will help to keep your directory clean and organized.
Note that before deleting an enterprise application, you should ensure that there are no active sessions or user accounts associated with the application.