azure-devops-python-api icon indicating copy to clipboard operation
azure-devops-python-api copied to clipboard

[question] Is it safe to use the Identity APIs even though it is not documented?

Open arvinatwork opened this issue 7 years ago • 3 comments

We need to call some api's that need identities. Is there alternative api for getting identities?

For example we need to do these:

  • Add team administrator for a project group: missing api or location id _apis/_identities/AddTeamAdmins
  • Add release approvers in release pipeline environments: ReleaseDefinitionApprovalStep needs identity

arvinatwork avatar Apr 08 '19 11:04 arvinatwork

The Graph apis are meant to replace the Identity apis, but the Identity apis will continue to work, and are safe to use.

tedchamb avatar Apr 22 '19 17:04 tedchamb

Alright thank you! Do you have any suggestion on what to use for endpoints that requires IdentityRef without using the identity api?

arvinatwork avatar Apr 23 '19 10:04 arvinatwork

So for those APIs, the identity ref object will be filled in with either "descriptor" or "id". For the authenticated user you can retrieve these using the /_apis/connectionData endpoint. For other users you can retrieve these using the get users and get storage keys endpoints respectively

kenankigunda avatar Apr 23 '19 18:04 kenankigunda