How to check for all assignable users for a Azure Devops Work Item via REST API

I’m trying to integrate my app with Azure Devops for Ticket handling on there. For Creation of Work Item I wanted to know how I can check for list of assignees, if I wish to give manual input for assignee in ticket creation.

I tried using security namespace: 52d39943-cb85-4d7f-8fa8-c6baac873819 because I think this namespace for a project has access to read & write azure devops tickets. But I’m unable to find member of this security group and not too sure if this is the right approach either

New contributor

Sanket Kar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

According to your description, you want to allow your user to select the correct assignee when manually entering the assignees name.

We can get the REST API which is used in the Azure DevOps UI by checking the network trace in Developer tools of Microsoft Edge.

For example, in the following screenshot, I searched the keyword “test”, and it will return the users contain the word.

Now, we get the Request URL: https://dev.azure.com/{orgname}/_apis/IdentityPicker/Identities and the Request payload:

{
    "query": "test",
    "identityTypes": [
        "user",
        "servicePrincipal"
    ],
    "operationScopes": [
        "ims",
        "source"
    ],
    "options": {
        "MinResults": 5,
        "MaxResults": 40
    },
    "properties": [
        "DisplayName",
        "IsMru",
        "ScopeName",
        "SamAccountName",
        "Active",
        "SubjectDescriptor",
        "Department",
        "JobTitle",
        "Mail",
        "MailNickname",
        "PhysicalDeliveryOfficeName",
        "SignInAddress",
        "Surname",
        "Guest",
        "TelephoneNumber",
        "Manager",
        "Description"
    ]
}

Here is the sample PowerShell script to call the API for your reference:

# Replace with your actual value
$organization = ""
$searchkeyword = "test"
$personalAccessToken = ""

# Create the request body
$requestBody = @"
{
    "query": $searchkeyword,
    "identityTypes": [
        "user",
        "servicePrincipal"
    ],
    "operationScopes": [
        "ims",
        "source"
    ],
    "options": {
        "MinResults": 5,
        "MaxResults": 40
    },
    "properties": [
        "DisplayName",
        "IsMru",
        "ScopeName",
        "SamAccountName",
        "Active",
        "SubjectDescriptor",
        "Department",
        "JobTitle",
        "Mail",
        "MailNickname",
        "PhysicalDeliveryOfficeName",
        "SignInAddress",
        "Surname",
        "Guest",
        "TelephoneNumber",
        "Manager",
        "Description"
    ]
}
"@

# Define the API URL
$url = "https://dev.azure.com/$organization/_apis/IdentityPicker/Identities?api-version=5.0-preview.1"

# Create the headers
$headers = @{
    "Content-Type" = "application/json"
    "Authorization" = "Basic " + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(":$personalAccessToken"))
}

# Make the POST request
$response = Invoke-WebRequest -Uri $url -Method Post -Headers $headers -Body $requestBody

$jsonResponse = $response.Content | ConvertFrom-Json

# Output the formatted JSON response
$jsonResponse | ConvertTo-Json -Depth 10

Test result:

Note:

Since this API is not documented in the official documentation, the required access scope is not determined. Therefore, currently only a personal access token with full access scope can call this API.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật