I am unable to find any ADO .net client libraries/rest apis to find all the users related to a particular project, project can be belong to ADO server or TFS (>2013) and ADO service.
I used GraphHttpClient but it is deprecated now and can not be used with TFS, I guess. I am unable to find its documentation either. Also I am facing trouble how to use Microsoft Graph client to do this.
To get the users of Azure DevOps Service, we can use the API: Users - List with the variable
scopeDescriptorto get the list of user in one project.Refer to the following steps:
Step1: Use Rest API: List all projects and get the project ID.
Step2:Get the one project scopeDescriptor via Descriptors - Get
For example:
We can record the value(scp...) of the value field in the response. The value is scopeDescriptor.
Step3: Add the related values to the Rest API:
Then we could only get the list of users in one project.
If you need to run the Rest APIs in TFS or Azure DevOps Server, you can change to use the related Rest API version.
For example: You can check it in the dropdown list of the doc.
Update:
To get the users in the TFS or Azure DevOps project, you can use the client API you mentioned above to retrieve the user list.
You can check the group:
[projectname]\\Project Valid Usersto get all users in the project.Here is an example: