TFS Build 2015 - Get Capabilities of Build Agents - tfs

I am trying to programmatically find the Capabilities of each Build Agent.
I found the Rest-API to list all Build Agents
http://[tfsurl]/_apis/distributedtask/pools/[poolid]/agents?api-version=2.3-preview.1
But this will only show the basic information of the agent.
Is there a way to get more detailed information on the Agents and its Capabilities ?
Additionally, is there a good page with the REST-API options, i have not able to find above API link in the documentation anywhere, i found it on another SO page.

The agent REST API is undocumented, see REST API Overview for Visual Studio Team Services and Team Foundation Server for more information.
However you can use tools such as Fiddler to track the the API, following below steps to get Capabilities of Build Agents with REST API:
Get Pool ID :
GET http://server:8080/tfs/_apis/distributedtask/pools/
Get Agent ID based on the pool ID :
GET http://server:8080/tfs/_apis/distributedtask/pools/39/agents/
Get the Capabilities of the specific Build Agent:
GET http://server:8080/tfs/_apis/distributedtask/pools/39/agents/158?includeCapabilities=true
If you just want to get the information of the Agents and its Capabilities, the simplest way is via the web portal:
Go to TFS Home page : http://server:8080/tfs/_home
Navigate to Manage Server (gear icon) > Agent Pools > Select a pool > Select the agent > Capabilities

Related

How to connect Visual Studio 2019 to TFS server

I have TFS 2018. I'm trying to connect visual studio 2019. I can already use tfs via web browser. I can log in and everything is fine. But when I try to connect through vs, I can't get authorized. I get
Server 'https://Myserver:8080/tfs' was not added. TF30063. You are not authorized to access https://myserver:8080/tfs
I researched the error code and tried all the fixes including deleting the windows credentials, running vs as admin and others. Like I said, I can log in via my web browser with no problem.
When I try to connect to project, It has my Microsoft account. I enter the above url and I'm prompted for my windows login (same for the browser) and I keep getting the error. I thought maybe I add the account before connecting, but when I try to add an account, the only popup wants me to use a Microsoft account or GitHub account. I can't add my Windows account.
So how do I connect my visual studio to my tfs server?
Thank you.
You should not get a Microsoft Account Prompt if you are trying to connect locally. The prompt is to validate your instance of VS towards your MSDN subscription. You would need to "login" with you Microsoft or Azure AD user that can validate your VS license and to be able to synchronize your settings from one VS to another. This login is the one here
Notice the account settings there, if you click on this you can also add your Visual Studio 2019 Static Key and then you don't need to login every month unless you want to sync your settings.
Bottom line, when connecting to TFS 2018 it will not ask you for Microsoft Credentials.
Please check whether you use the correct URL, and use http instead of https. Also, try the following items:
Close all Visual Studio instances, delete %LOCALAPPDATA%.IdentityService.
Clear TFS caches %LOCALAPPDATA%\Microsoft\Team Foundation\x.0\Cache
Click Add Azure DevOps Server and add the server URL:

I want to invite the member to team on tfs but getting error 'No identities found'

I am getting error "No identities found" when inserting member to my team. I've verified the email address is correct. Why am I seeing this text? How can i fix this?
why cannot found?
You have to use an Active Directory account for on-premise TFS -- you can't provide a hotmail account.
According to your screenshot, you are working on VSTS, you could double confirm this-- sever url should like https://xxx.visualstudio.com.
And you want to login VSTS with an non Microsoft email, you should pay attention to below:
Sign up for Visual Studio Team Services with a work or school account
Control access to Visual Studio Team Services the same way you do with
Microsoft services like Office 365 and Azure. When you sign up with a
work or school account, your Visual Studio Team Services account is
connected to your organization's directory (tenant) in Azure Active
Directory (Azure AD). You can then use the same username and password
as other Microsoft services, like #fabrikam.com. Azure AD helps you
enforce policies around accessing your team's critical resources and
key assets.
More details, please refer link from MSDN: Sign up for Visual Studio Team Services: Git & Agile for DevOps, continuous integration, & continuous delivery
Finally, just follow the details steps in this tutorial to add users to a team project.

Missing service account

My pipeline doesn't start due to error:
(8e45efed0ad51300): Workflow failed. Causes: (8e45efed0ad51e7b): There was a problem refreshing your credentials.
Please check:
1. Dataflow API is enabled for your project.
2. There is a robot service account for your project: [project number]#cloudservices.gserviceaccount.com should have access to your project. If this account does not appear in the permissions tab for your project, contact Dataflow support.
I assume that Dataflow API is enabled as I'm able to reach Dataflow monitoring console, so first requirement is fulfilled. Second isn't. There is no a single account in the domain cloudservices.gserviceaccount.com.
Where can I ask for such help without paid support plan?
If you disable and then re-enable the Dataflow API for your project that should create the missing service account.
Hope that helps!

callbackurl while connecting to vso using oAuth

I am trying to connect to VSO using oAuth.
First step is to register our app and configure a call back url.
I am creating a console application to test the connectivity.
Please let me know how to configure the callback url.
Firstly, please take note that: Right now, it is only supported to register web application, it is impossible to register a console app.
So, you need to have a web app first, you can download and use this sample project for a quick start: https://vsooauthclientsample.codeplex.com/
After you download the app, open it in VS2013 or higher, right-click it in Solution Explorer and select Publish.
On the Publish Web page, select Microsoft Azure Website option to publish that web app to Azure.
Then, the web app is published to Azure with the URL similar to: https://vsodevabc.azurewebsites.net
And when you register this web app, you can set Application Website and Callback URL to be the followings. (note: the callback URL should be https://yoursite.azurewebsites.net/oauth/callback, where "yoursite" is the name of your Azure web site)
When using VSO (now called Team Services) with oAuth2.0 you do have to provide callback url endpoint that Microsoft's Team Services can call directly. So you need to have your application's callback url endpoint published such as publishing to Azure or Aws or any hosting provider that will allow you to have publically accessible url. In the FAQ under Team Services Rest API, there is mention of this approach for debugging purposes:
Visual Studio Team Services does not allow localhost to be the hostname in your callback URL. You can edit the hosts file on your local computer to map a hostname to 127.0.0.1. Then use this hostname when you register your app. Or, you can deploy your app when testing to a Microsoft Azure website to be able to debug and use HTTPS for the callback URL
Visual Studio Team Service's Rest API oAuth

TFS 2010 - Portal settings

It doesn't appear that you can modify the base url for the portal settings in TFS 2010. I currently have
http://tfsserver.mydomain.com
I would like the system to launch
http://tfsserver
instead when a user selects 'Show project portal' from Team Explorer.
Is it possible to change the site root that it points to? We keep getting security prompts with fqdn.
I found the answer myself. On the application tier, open the admin console, select SharePoint Web Applications and change the base url there.

Resources