1
Solved

Not Authenicating with correct account

Due to company restrictions, I currently have the fun of needing to use a separate account with elevated permissions to develop.

I have tried adding my separate login under the "provide credentials" option, but it still appears to be using my primary windows login.

I know this because my development login has permissions on the full collection, where as I have only got 2 projects under my primary account.

The following is what the log file shows, starting with CredentialsType: "Password", if I then go into the settings again, the Auto Configure is checked, unchecking does show my development account entered (password looks blank). I do have psr available if you need some screenshots, just the result take a while to prepare for anything outside of the corporate domain.

I am currently bypassing this by adding my primary login to have access to the projects below the collection.

2016-06-27 10:15:01.6611 |  INFO | EventLogger | {"e":"Tfs.UpdaingSettings","p":{"CredentialsType":"Password","AutoDetectSettings":false,"IsVSO":false}}
2016-06-27 10:15:01.8021 | DEBUG | MultiVersionTfsAdapter | Using TFS 2015 / VSO adapter
2016-06-27 10:15:01.9211 | DEBUG | ConfigurationManager | Saving settings: Web.Services.Builds.Settings.BuildModuleSettings
2016-06-27 10:15:01.9701 |  INFO | EventLogger | {"e":"Builds.EditBuildSettings","p":{"ModuleType":"Tfs"}}
2016-06-27 10:15:01.9701 | DEBUG | ConfigurationManager | Web proxy not configured.
2016-06-27 10:15:02.0722 | DEBUG | MultiVersionTfsAdapter | Using TFS 2015 / VSO adapter
2016-06-27 10:15:02.0732 | DEBUG | TfsAdapterBase | [ServerName]: Loading build definitions
2016-06-27 10:15:02.0732 | DEBUG | TfsAdapterBase | Getting tfs collection properites
2016-06-27 10:15:02.6182 | DEBUG | PollingBuildModule | [ServerName]: Status changed
2016-06-27 10:15:03.1463 | DEBUG | TfsAdapterBase | [ServerName]: Loaded build definitions
2016-06-27 10:15:05.7005 |  INFO | EventLogger | {"e":"App.Running","p":{"Modules":1,"ModuleStats":[{"Type":"Tfs"}],"PollingPeriod":"00:01:00","UpTime":"00:01:00","ClientId":"53e60ba50ecf4b7d936164634901d554","Os":"Windows"}}
2016-06-27 10:15:12.9532 |  INFO | EventLogger | {"e":"Build.UpdateProjectSettings","p":{"ProjectCount":2,"BuildCount":115,"MonitoredBuildCount":7}}
2016-06-27 10:15:12.9532 | DEBUG | ConfigurationManager | Saving settings: Web.Services.Builds.Settings.BuildModuleSettings
2016-06-27 10:15:13.0252 | DEBUG | ConfigurationManager | Web proxy not configured.
2016-06-27 10:15:13.4413 | DEBUG | PollingBuildModule | [ServerName]: Status changed
2016-06-27 10:15:13.5673 | DEBUG | PollingBuildModule | [ServerName]: Status has not changed
2016-06-27 10:15:29.6949 |  INFO | EventLogger | {"e":"Builds.EditBuildSettings","p":{"ModuleType":"Tfs"}}
2016-06-27 10:15:29.6949 | DEBUG | TfsAdapterBase | [ServerName]: Loading build definitions
2016-06-27 10:15:30.0390 | DEBUG | TfsAdapterBase | [ServerName]: Loaded build definitions
2016-06-27 10:15:30.9450 |  INFO | EventLogger | {"e":"Tfs.EditConnectionSettings","p":null}
2016-06-27 10:15:42.7190 | DEBUG | TfsController | Checking connection to 'http://[ServerName]:8080/tfs/[dc]'
2016-06-27 10:15:42.8620 | DEBUG | TfsController | Received OK status code
2016-06-27 10:15:42.8620 |  INFO | EventLogger | {"e":"Tfs.UpdaingSettings","p":{"CredentialsType":"WindowsIntegrated","AutoDetectSettings":true,"IsVSO":false}}
2016-06-27 10:15:42.9490 | DEBUG | MultiVersionTfsAdapter | Using TFS 2015 / VSO adapter
2016-06-27 10:15:43.0270 | DEBUG | ConfigurationManager | Saving settings: Web.Services.Builds.Settings.BuildModuleSettings
2016-06-27 10:15:43.0700 |  INFO | EventLogger | {"e":"Builds.EditBuildSettings","p":{"ModuleType":"Tfs"}}
2016-06-27 10:15:43.0700 | DEBUG | ConfigurationManager | Web proxy not configured.
2016-06-27 10:15:43.1521 | DEBUG | MultiVersionTfsAdapter | Using TFS 2015 / VSO adapter
2016-06-27 10:15:43.1521 | DEBUG | TfsAdapterBase | [ServerName]: Loading build definitions
2016-06-27 10:15:43.1521 | DEBUG | TfsAdapterBase | Getting tfs collection properites
2016-06-27 10:15:43.7781 | DEBUG | TfsAdapterBase | [ServerName]: Loaded build definitions
2016-06-27 10:15:43.9311 | DEBUG | PollingBuildModule | [ServerName]: Status changed
2016-06-27 10:15:47.2125 |  INFO | EventLogger | {"e":"Build.UpdateProjectSettings","p":{"ProjectCount":2,"BuildCount":115,"MonitoredBuildCount":7}}
2016-06-27 10:15:47.2125 | DEBUG | ConfigurationManager | Saving settings: Web.Services.Builds.Settings.BuildModuleSettings
2016-06-27 10:15:47.4875 | DEBUG | ConfigurationManager | Web proxy not configured.
2016-06-27 10:15:55.3113 | DEBUG | PollingBuildModule | [ServerName]: Status changed
2016-06-27 10:15:55.4973 | DEBUG | PollingBuildModule | [ServerName]: Status has not changed

4 replies

LD

Hi,

I am putting a fully defined set of creds.

I can login with my develop creds on the browser, but it does change the url when I browse to tfs/_home and not let me "see" tfs/[Default Collection] (does that matter)?

 

If I start the whole application running as my other account, it works with auto configure and returns the full list of expected builds.

Cheers.

LD

Afraid this isn't working, I did say we are special so might just be us.

 

I forgot to say that the account I am using is an account on a different subdomain. So I log on as Business\name and then connect using Develop\name

2016-07-01 08:45:04.2773 |  INFO | EventLogger | {"e":"Tfs.UpdaingSettings","p":{"CredentialsType":"Password","AutoDetectSettings":false,"IsVSO":false}}
2016-07-01 08:45:04.2773 |  WARN | TfsController | Cannot save settings Web.Common.AuthenticationException: Need credentials. ---> Web.Common.AuthenticationException: Authentication failed. Error code: Unauthorized
   at Web.Services.Tfs.TfsAdapterBase.EnsureSuccessfulResponse(HttpResponseMessage response)
   at Web.Services.Tfs.TfsAdapterBase.<>c__DisplayClass22_0`1.<<TfsGet>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Web.Services.Tfs.Tfs2015Adapter.<InvokeWithAuthRetry>d__11`1.MoveNext()
   --- End of inner exception stack trace ---
   at Web.Services.Tfs.Tfs2015Adapter.<InvokeWithAuthRetry>d__11`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Web.Services.Tfs.TfsAdapterBase.<TfsGet>d__22`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Web.Services.Tfs.TfsAdapterBase.<TfsGetMultiple>d__21`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Web.Services.Tfs.Tfs2015Adapter.<VerifyConnectionSettings>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at Web.Services.Tfs.MultiVersionTfsAdapter.<DetectVersion>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Web.Services.Tfs.MultiVersionTfsAdapter.<VerifyConnectionSettings>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at Web.Services.Builds.PollingBuildModule.<SetConnectionSettings>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at Web.Controllers.TfsController.<UpdateConnectionSettings>d__8.MoveNext()
2016-07-01 08:45:04.2929 |  INFO | EventLogger | {"e":"Tfs.FailedToUpdateSettings","p":{"Message":"Authentication failed. Error code: Unauthorized"}}

Just to be sure - you put "develop\name" in user name prompt in the app? Because plain "name" without domain wouldn't work even in single-domain scenario.

You can also try specifying creds directly on creating connection, without trying automatic configuration.

Can you log in to TFS web UI in Internet Explorer, when you use the same URL and creds, as in the app?

LD

sorry posted as a new reply rather than a comment on this.

Thanks for report! This will be fixed in the next update.