Missing security menu in TFS 2015 - tfs

I want to make use of the TFS API to retrieve information about builds/commits etc. As I follow this article, I see that I first need to create a security token for my user.
However, nowhere in my TFS web interface I can find where to configure the security of my user.
Any tips? What do I miss?
P.s. I use TFS on-premise, not Team Services (should not make difference though)

There should be . From your home page, open your profile. Go to your security details. Add the screenshot of my TFS2017 for your reference:
Note: Personal access tokens are only available with TFS 2017 and above or VS Team service. It's not support in TFS2015.
When pointing to TFS2015 or TFS2013, you may have to pass a username and password (could masked as a secret variable) in your script instead of using personal access tokens. For a sample you can refer below links:
VSTS/TFS REST API: The basics and working with builds and releases
TFS 2013.4 On-Premise. Enable Basic Authentication to access Tfs
REST Api

Related

TFS 2015 Prevent Checkin via Web Portal

The Code tab in a Team Project's TFS web portal allows users to check in/out items. Is there a way other than assigning users to the Stakeholder access level to prevent them from being able to check things in via the Web Portal if they have the permissions to actually check into a Team Project? It seems like you cannot explicitly exclude the Code tab form the Default or Advanced access levels, nor can you define a custom access level.
Our issue with the check in of an item from the Web Portal is that it does not evaluate any check in polices, nor can you associate the object you are checking in with a Work Item. We to want enforce developers using only Visual Studio to check in items into source control.
TFS doesn't provide the feature to stop users from checking in at web page. The workaround it to give the access level for your users.
Here is an user voice about your issue that you could vote and add comments: https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/19026091-prevent-users-to-check-in-changes-from-tfs-web-pag
Maybe that you could consider to user Git version control in TFS. In Git repository of TFS, it provide git branch policies that may solved your issue. This is much similar to the check in policies.
Here is a document about move from TFVC to Git: https://www.visualstudio.com/learn/migrate-from-tfvc-to-git/

Issues with TFS Aggregator implementation

We used TFS Aggregator to automatic update the User Story's state according to its sons state changes and also to automatic Update User Story's state of other project (if they are related).
Also important to mention that we hire an external freelance to help us doing it. When we tested it on his environment - it worked well. But when deploy it in
our environment - there's no change, the new functionality doesn't work.
what you recommend us to check ?
what can be the reasons for this integration problem?
What actions should we take?
Your advises are more than welcome!
First, try to follow the steps of installation on this website to install the plugin: https://github.com/tfsaggregator/tfsaggregator/wiki/Install
If it still doesn't work. Here is the troubleshooting page you can refer to: TFS Aggregator Troubleshooting:
You are using the right version of this server side plugin for the
right server. You can get multiple releases of this plugin at website
https://github.com/tfsaggregator/tfsaggregator
You have updated a work item that triggers a rule. (The TFS
Aggregation only works once a work item that has aggregation rules on
it is updated. This may change in a future version.)
If the rule navigates between work items, work items have a proper
Link (e.g. Parent-Child).
You copied the DLLs and the Policies file to the plugins location on
all TFS Application Tier Servers (Usually at: :\Program
Files\Microsoft Team Foundation Server {version}\Application Tier\Web
Services\bin\Plugins)
You have valid names for source and destination fields in
TFSAggregator2.ServerPlugin.policies.
When you saved the file you saved it as UTF-8 encoding (in Notepad++
it is called “utf-8 without BOM”).
You have given permission to the user running the plugin, e.g. add
the "TFS Service Account" to the Project Collection Administrators
TFS Group.
You may have to do this from the commandline using tfssecurity
/collection:http://server:8080/tfs/DefaultCollection /g+ "Project
Collection administrators" "LOCAL SERVICE" if your service account is
either LocalService, NetworkService or any other Windows Well-known
identity, since they are no longer shown in the permission UI.
When using the Impersonation option, make sure the user executing the
plugin (generally the TFS Service account) has the "Make requests on
behalf of others" permission at the server level
If you upgraded your TFS from 2013.x to 2015.* and from 2015rtm to
2015.1 and did not uninstall the TFS Aggregator before doing this TFS upgrade the aggregator does not work. Remove the TFS Aggregator from
the TFS 2013 Program Files folder or run the uninstall of the TFS
Aggegrator (backup your policies!). Then re-install the TFS
Aggegrator setup or install manually for TFS 2015 as described here.
Every TFS version has its "own" assembly for the aggregator so it is
important to use the right version against the right TFS.

TFS 2013 Custom dashboard widget

I have been tasked with creating a custom planning view from TFS.
I have a reasonable amount of experience with the TFS Api but I want to try and avoid having to create and maintain a new application for this.
I have looked at SSRS for TFS but I am unable to access all of the data I need (tags etc.) so this is not an option (as it will invalidate support).
I would ideally like to create a "widget" to appear on one of the TFS dashboards but am not sure where to start. The widget would also need to allow access to the TFS api to gather the data it needs to generate.
Please can someone advise where I may look to start or an alternative approach.
You may want to take a look at http://integrate.visualstudio.com where you can find documentation for the TFS API. The REST API works for TFS 2015 and above.
While you can extend the web interface with Extensions (https://marketplace.visualstudio.com/) in Visual Studio Team Services (VSTS), this feature is not yet available in TFS on-premises as of TFS 2015 Update 1.
You can check the published feature timeline for updates, but at this time extensions for TFS are marked as "TBD".
If you're working with TFS2013 + Update2 or a higher version of TFS, it is allowed for Team Administrators to customize TFS dashboard via pinning items to the homepage without writing any code.
For example, if you would like to add a chart into the dashboard, you just need to go to the query’s Charts page and pin it to the home page. See the following image (quoted from this MSDN article)

Connect TeamCity to Visual Studio Online

I'm trying to migrate from on-premises TFS to Visual Studio Online. We have quite elaborate TeamCity build process that we don't want to migrate away from, so having TeamCity working with VSO would be ideal.
I've created alternative user credentials (as per this article) and using these credentials in TeamCity. But when I create new VCS in TeamCity, I get connection error:
TF30063: You are not authorized to access https://myproject.visualstudio.com/DefaultCollection/MyProject
I've tried my actual credentials (not alternative ones) but nothing changed - same error.
Also I've tried using alternative credentials with tf command line tool and could not enter alternative credentials - a window popped up, asking me for my LiveId.
Any idea how to fix this?
p.s. this is how TeamCity configuration look like:
To connect to Visual Studio Online you indeed need to enable alternate credentials on the account you'll use for Team City. Ensure that at least Team Explorer 2012 and update 4 is installed on the Team City server, install the whole Visual Studio 2012 incl Update 4. Team City requires at least update 2, but Microsoft only supports Visual Studio 2012 RTM and the latest update (which is update 4).
Then in the connection screen use the following information:
Repository URL: https://myaccount.visualstudio.com/DefaultCollection
Username: ##LIVEID##\your.email#live.com // Your visual Studio Online User Name, must match your LiveId.
Password: ********* // The password you setup for the alternate credentials.
You can also use the VSO Service Account credentials instead of using Alternate Credentials.
Then in your VCS Root configuration map your TFVC root in the following way:
Root: $/MyProject/Path/To/Branch/Root
Check out this post on the Jetbrains Confluence site for more details.
This has changed lately and the password needs to be generated.
Navigate to your site at https://[your project].visualstudio.com/_details/security/tokens
And generate a personal access token. And use it for password in your teamcity vcs root configuration. Username is your email.
https://streamlined.no/2016/09/19/connecting-teamcity-10-vcs-root-visual-studio-team-services/
Note: TeamCity 10 does not need the ##LIVE## workaround anymore.
I had the same problem today. The TC instance which was working fine last week mysteriously could not connect to any VCS Roots after the weekend. All VCS roots are git repos in visual studio online.
The Test Connection was failing and changing to known working user accounts still failed.
Restarting the TC service also had no impact on the problem. In the end, rebooting the whole TC Server fixed the issue. Hopefully this will help someone else out.
Well, I could not use Alternate credentials as I use it in many build configurations and it was set up to poll every 60 seconds. So I had to do much manual work to fix it up. Instead, I generated a Personal Access Token and in the Team City VCS setup for Git I entered "username" as the username and pasted the PAT into the password. That worked much better and more stable than Alternate credentials, which kept getting disabled because of background polling on behalf of Team City.

Visual Studio Team System 2008 & Domain Issues

We have TFS installed in a US server. We need to login into VPN to access the TFS server. TFS is configured to use with company's domain user account. However my system is part of the domain. Hence I couldn't access the TFS. I have Visual Studio Team System Developer edition. Can someone here help how to access TFS server installed with different domain?
Regards,
Krish
TFS uses the domain information of the current logged in Windows account, it's part of the TFS API.
If you're logging into the machine with an account which is on a different domain (Note: Local users are also on a different domain) you will not get single-sign-on.
As far as I'm aware there isn't a way around the authentication model which VSTS uses. You could write your own VSTS-style extensions using the existing VS API which say, uses a config file for the authentication credentials as the TFS API does support authentication through a manually-created user (we have an external application at work which authenticates against our TFS server and is used by employees of our many offices on different domains).
For codeplex you have to connect to TFS using 'SND\username_cp', maybe you can use 'DOMAINNAME\username' as well.

Resources