Baequiraheal
Baequiraheal

Reputation: 139

How to check when user was added to team/group in Azure DevOps via API?

I am new to Azure DevOps. I want to check when particular user was added to a group/team via REST API. I referred to the documentations, but could find anything.

Upvotes: 1

Views: 1362

Answers (1)

Kevin Lu-MSFT
Kevin Lu-MSFT

Reputation: 35119

I am afraid that there is no such Rest API to get the time when a user joins a group or team.

For workaround:

The date and operation will be recorded in Organization Settings -> Auditing -> Logs.

enter image description here

You could export the Auditing log and search the opearation in it.

This method has limitations, you can only view logs within 90 days. Therefore, you need to export the log regularly to ensure that you will not miss some records.

On the other hand, the requirement makes sense. You could submit a suggestion ticket about this feature in our UserVoice website.

enter image description here

Update:

Is there any way to get all of the groups on project level ?

Here is my rest api sample:

https://vssps.dev.azure.com/Organizationname/_apis/graph/groups?scopeDescriptor=xxx&api-version=5.1-preview.1

enter image description here

Get scopeDescriptor:

GET https://vssps.dev.azure.com/{organization}/_apis/graph/descriptors/{ProjectID}?api-version=5.0-preview.1

enter image description here

Upvotes: 2

Related Questions