Is there a automatic(script or similar) way of removing account subscription from Azure DevOps when account removed from company AD. Today this is a manual effort in our company and not very effective.
Remove Azure DevOps Account when remove from company AD
649 views Asked by user3440473 At
2
There are 2 answers
1
On
Thanks, this partly answers my questions. In the best of worlds I would however the account be removed from the AzDO organisation (automatically) when removed from AD. Using group rule for example does not remove the users from the organization.
It would also be OK to have a script that checks if user is part of AD and then removes from AzDO organization if not available in the AD.
If you want to delete service connections of subscriptions, you can use some REST APIs.
Step1. Get the project id where you want to delete connections
Step2. Get a list of service connection ids in the project:Endpoints - Get Service Endpoints list
Or you can get a specific service connection id by its name: Endpoints - Get Service Endpoints By Names:
Step3: Delete service connections: Endpoints - Delete:
Multiple service connections can be quickly deleted by using the service connection id as the
{endpointId}
and repeating this REST API.