microsoft / microsoft/azure-devops-go-api

Delete Service Principal Entitlement using graph information

Open
#170 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
223
Forks
92
PR merge metrics
No merged PRs in 30d

Description

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!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the azure-devops-go-api memberentitlement operations named in the issue, especially AddServicePrincipalEntitlement and DeleteServicePrincipalEntitlement, and compare their inputs with the Azure DevOps graph API information. Determine whether graph-based deletion is supported; done would require a documented API capability or a clearly scoped SDK change, but no files or tests are identified here.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, go
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.