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

Delete Service Principal Entitlement using graph information #170

Open
dipti-pai opened this issue Aug 28, 2024 · 0 comments
Open

Delete Service Principal Entitlement using graph information #170

dipti-pai opened this issue Aug 28, 2024 · 0 comments

Comments

@dipti-pai
Copy link
Member

dipti-pai commented Aug 28, 2024

I am working on a gitops project that automatically pulls from Azure Devops repositories using managed identity. To test this in an automated way, I create an Azure DevOps organization, project and add the managed identity as a user in the Azure DevOps organization with permissions on the projects in the organization using azure-devops-go-api memberentitlement API (AddServicePrincipalEntitlement). At the end of the test, I want to cleanup the managed identity user that was added to the organization.

Looking at the Azure DevOps REST API and the go sdk memberentitlement deleteserviceprincipalentitlement API, this takes servicePrincipalID as the input. From what I have read so far, the servicePrincipalID is returned when addserviceprincipalentitlement API is called. Because of the way the cleanup happens, it is not always possible to know the servicePrincipal ID.

My question is if it is possible to delete the service principal entitlement by matching the user from graph API rather than using the servicePrincipalID ?

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant