Matthew The Terrible
Matthew The Terrible

Reputation: 1643

Is there a way to tell if user is the organization admin in azure devops extension api

Using the Azure Devops Extension API in an extension I'm building and wondering if there is an API available to tell if the current user is the organization admin so that we can hide/show different options for that user(s). Or is there another API that I can hit from my extension to get some extended details about the current user rather than what comes back with SDK.getUser()

Upvotes: 1

Views: 359

Answers (1)

Cece Dong - MSFT
Cece Dong - MSFT

Reputation: 31063

You can get PCA members via the API below, and check whether the current user in PCA:

GET https://vsaex.dev.azure.com/{organization}/_apis/GroupEntitlements/{groupId}/members?api-version=6.0-preview.1

https://learn.microsoft.com/en-us/rest/api/azure/devops/memberentitlementmanagement/members/get?view=azure-devops-rest-6.0

Upvotes: 1

Related Questions