Hi
Please check i tested the same code with 10 seconds , 15 seconds and indefinite delay but still teamid and team name does not fetch
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello Microsoft Dev Team,
Scenario: I am developing a custom Work Item Form Extension for Azure DevOps using the officially supported Extension SDK (v4.x). My requirement is to fetch the Team ID and Team Name for the currently logged-in user in the context of the selected project.
Problem:
SDK.getWebContext(), etc.) do not provide team information inside Work Item Form extensions.The only widely recommended method is to call the Teams API via CoreRestClient.getTeams(projectId, true), which works but is a REST API call, not a direct context property.
Many organizations (including ours) would prefer not to make REST calls if the context is already known to the host/SDK.
Question:
Is there a built-in or alternate way, other than using the REST API, to access the current user’s Team ID and Team Name in a Work Item Form extension (e.g., via SDK context, host variables, or another extension contract)?
Are there any plans to expose team context directly in future SDK releases for Work Item Form extensions?
If not, is there any officially recommended workaround besides calling getTeams and filtering for the current user?
References:
Current Official Docs for CoreRestClient.getTeams()
Azure DevOps Extension Work Item Context
GitHub Issue #32 - Team Context in Work Item Extensions
What I’m Looking For:
A way to fetch team context without making a REST API call in Work Item Form extensions (if possible).
Or, confirmation that the REST API is the only way, with possible roadmap notes.
Thank you!Hello Microsoft Dev Team,
Scenario:
I am developing a custom Work Item Form Extension for Azure DevOps using the officially supported Extension SDK (v4.x). My requirement is to fetch the Team ID and Team Name for the currently logged-in user in the context of the selected project.
Problem:
The SDK context objects (SDK.getWebContext(), etc.) do not provide team information inside Work Item Form extensions.
The only widely recommended method is to call the Teams API via CoreRestClient.getTeams(projectId, true), which works but is a REST API call, not a direct context property.
Many organizations (including ours) would prefer not to make REST calls if the context is already known to the host/SDK.
Question:
Is there a built-in or alternate way, other than using the REST API, to access the current user’s Team ID and Team Name in a Work Item Form extension (e.g., via SDK context, host variables, or another extension contract)?
Are there any plans to expose team context directly in future SDK releases for Work Item Form extensions?
If not, is there any officially recommended workaround besides calling getTeams and filtering for the current user?
References:
Current Official Docs for CoreRestClient.getTeams()
Azure DevOps Extension Work Item Context
GitHub Issue #32 - Team Context in Work Item Extensions
What I’m Looking For:
A way to fetch team context without making a REST API call in Work Item Form extensions (if possible).
Or, confirmation that the REST API is the only way, with possible roadmap notes.
Thank you!
Rajneesh Sheth
Hi
Please check i tested the same code with 10 seconds , 15 seconds and indefinite delay but still teamid and team name does not fetch
please suggest how do i share privately ?
Regards,
Rajneesh
Hi , with REST API i am unable to fetch Teamid and Team Name , i am using JavaScrip to write the REST API while fetching it is waiting for SDK to be ready with await SDK finally it fails
kindly suggest
Thank You.
Please close the request
As of the latest, there is no officially supported way to retrieve the current user's Team ID or Team Name directly from the Work Item Form Extension context without using a REST API call.
SDK.getWebContext() does not include team information for Work Item Form extensions.
As confirmed in Azure DevOps GitHub issues CoreRestClient.getTeams(projectId, true) - this is the only officially recommended and supported method to retrieve team information.
Here the true flag includes teamMembers, which you can use to filter the current user.
Additional References:
Hope this helps!
Please Let me know if you have any queries.