com.microsoft.tfs.core.exceptions.TFSUnauthorizedException: Access denied connecting to TFS server http://pmtfs3:8080/ (authenticating as )

Jenkins JIRA | Bill Hurt | 2 years ago
  1. 0

    If the username and password are manually entered into a job configuration page then the plugin will properly authorize with TFS and jobs will complete on both Master and slaves. If the username and password are left blank to use the service credentials of the Jenkins Service, the all operations including the source code download will complete, but the call to tf.exe history will fail with an unauthorized exception. The issue may be similar to JENKINS-22046 but unsure. Inability to use service credentials is a problem because it rules out the use of Managed Service accounts, and requires lots of jobs to be updated if the credentials change (another reason to use Managed Service Accounts). FATAL: Access denied connecting to TFS server <servername> (authenticating as ) com.microsoft.tfs.core.exceptions.TFSUnauthorizedException: Access denied connecting to TFS server http://pmtfs3:8080/ (authenticating as ) at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:75) at com.microsoft.tfs.core.exceptions.mappers.LocationExceptionMapper.map(LocationExceptionMapper.java:32) at com.microsoft.tfs.core.clients.framework.location.internal.LocationWebServiceProxy.connect(LocationWebServiceProxy.java:76) at com.microsoft.tfs.core.clients.framework.location.LocationService.connect(LocationService.java:754) at com.microsoft.tfs.core.clients.framework.location.LocationService.ensureConnected(LocationService.java:884) at com.microsoft.tfs.core.clients.framework.location.LocationService.getInstanceID(LocationService.java:943) at com.microsoft.tfs.core.TFSConnection.getInstanceID(TFSConnection.java:533) at com.microsoft.tfs.core.clients.webservices.IdentityManagementService.<init>(IdentityManagementService.java:85) at hudson.plugins.tfs.model.Project.getVCCHistory(Project.java:84) at hudson.plugins.tfs.model.Project.getDetailedHistory(Project.java:128) at hudson.plugins.tfs.actions.CheckoutAction.checkout(CheckoutAction.java:56) at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:176) at hudson.model.AbstractProject.checkout(AbstractProject.java:1270) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:531) at hudson.model.Run.execute(Run.java:1751) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) Caused by: com.microsoft.tfs.core.ws.runtime.exceptions.UnauthorizedException: Authorization failure connecting to 'http://pmtfs3:8080/tfs/DefaultCollection/Services/v3.0/LocationService.asmx' (authenticating as ) at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:709) at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequest(SOAPService.java:473) at ms.ws._LocationWebServiceSoap12Service.connect(_LocationWebServiceSoap12Service.java:384) at com.microsoft.tfs.core.clients.framework.location.internal.LocationWebServiceProxy.connect(LocationWebServiceProxy.java:70) ... 17 more Finished: FAILURE

    Jenkins JIRA | 2 years ago | Bill Hurt
    com.microsoft.tfs.core.exceptions.TFSUnauthorizedException: Access denied connecting to TFS server http://pmtfs3:8080/ (authenticating as )
  2. 0

    If the username and password are manually entered into a job configuration page then the plugin will properly authorize with TFS and jobs will complete on both Master and slaves. If the username and password are left blank to use the service credentials of the Jenkins Service, the all operations including the source code download will complete, but the call to tf.exe history will fail with an unauthorized exception. The issue may be similar to JENKINS-22046 but unsure. Inability to use service credentials is a problem because it rules out the use of Managed Service accounts, and requires lots of jobs to be updated if the credentials change (another reason to use Managed Service Accounts). FATAL: Access denied connecting to TFS server <servername> (authenticating as ) com.microsoft.tfs.core.exceptions.TFSUnauthorizedException: Access denied connecting to TFS server http://pmtfs3:8080/ (authenticating as ) at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:75) at com.microsoft.tfs.core.exceptions.mappers.LocationExceptionMapper.map(LocationExceptionMapper.java:32) at com.microsoft.tfs.core.clients.framework.location.internal.LocationWebServiceProxy.connect(LocationWebServiceProxy.java:76) at com.microsoft.tfs.core.clients.framework.location.LocationService.connect(LocationService.java:754) at com.microsoft.tfs.core.clients.framework.location.LocationService.ensureConnected(LocationService.java:884) at com.microsoft.tfs.core.clients.framework.location.LocationService.getInstanceID(LocationService.java:943) at com.microsoft.tfs.core.TFSConnection.getInstanceID(TFSConnection.java:533) at com.microsoft.tfs.core.clients.webservices.IdentityManagementService.<init>(IdentityManagementService.java:85) at hudson.plugins.tfs.model.Project.getVCCHistory(Project.java:84) at hudson.plugins.tfs.model.Project.getDetailedHistory(Project.java:128) at hudson.plugins.tfs.actions.CheckoutAction.checkout(CheckoutAction.java:56) at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:176) at hudson.model.AbstractProject.checkout(AbstractProject.java:1270) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:531) at hudson.model.Run.execute(Run.java:1751) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) Caused by: com.microsoft.tfs.core.ws.runtime.exceptions.UnauthorizedException: Authorization failure connecting to 'http://pmtfs3:8080/tfs/DefaultCollection/Services/v3.0/LocationService.asmx' (authenticating as ) at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:709) at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequest(SOAPService.java:473) at ms.ws._LocationWebServiceSoap12Service.connect(_LocationWebServiceSoap12Service.java:384) at com.microsoft.tfs.core.clients.framework.location.internal.LocationWebServiceProxy.connect(LocationWebServiceProxy.java:70) ... 17 more Finished: FAILURE

    Jenkins JIRA | 2 years ago | Bill Hurt
    com.microsoft.tfs.core.exceptions.TFSUnauthorizedException: Access denied connecting to TFS server http://pmtfs3:8080/ (authenticating as )
  3. 0

    Error creating a new workspace

    Stack Overflow | 2 years ago | ShaggyInjun
    com.microsoft.tfs.core.ws.runtime.exceptions.UnauthorizedException: Authorization failure connecting to 'https://shaggyinjun.visualstudio.com/DefaultCollection/TeamFoundation/Administration/v3.0/LocationService.asmx' (authenticating as Windows Live ID\user)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How to catch UnauthorizedException when authentication fails

    Stack Overflow | 2 years ago | ShaggyInjun
    com.microsoft.tfs.core.ws.runtime.exceptions.UnauthorizedException: Authorization failure connecting to 'https://tfs.codeplex.com//tfs/TFS31/Services/v3.0/LocationService.asmx' (authenticating as snd\vra5107_c)
  6. 0

    TFS SDK Native Library Error in a web service deployed on Axis2-Tomcat7-Ubuntu platform

    microsoft.com | 11 months ago
    com.microsoft.tfs.core.exceptions.TFSUnauthorizedException: Access denied connecting to TFS server https://tfssite.visualstudio.com/ (authenticating as myid.jose485@outlook.com)

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.microsoft.tfs.core.ws.runtime.exceptions.UnauthorizedException

      Authorization failure connecting to 'http://pmtfs3:8080/tfs/DefaultCollection/Services/v3.0/LocationService.asmx' (authenticating as )

      at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal()
    2. com.microsoft.tfs
      SOAPService.executeSOAPRequest
      1. com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:709)
      2. com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequest(SOAPService.java:473)
      2 frames
    3. ms.ws
      _LocationWebServiceSoap12Service.connect
      1. ms.ws._LocationWebServiceSoap12Service.connect(_LocationWebServiceSoap12Service.java:384)
      1 frame
    4. com.microsoft.tfs
      IdentityManagementService.<init>
      1. com.microsoft.tfs.core.clients.framework.location.internal.LocationWebServiceProxy.connect(LocationWebServiceProxy.java:70)
      2. com.microsoft.tfs.core.clients.framework.location.LocationService.connect(LocationService.java:754)
      3. com.microsoft.tfs.core.clients.framework.location.LocationService.ensureConnected(LocationService.java:884)
      4. com.microsoft.tfs.core.clients.framework.location.LocationService.getInstanceID(LocationService.java:943)
      5. com.microsoft.tfs.core.TFSConnection.getInstanceID(TFSConnection.java:533)
      6. com.microsoft.tfs.core.clients.webservices.IdentityManagementService.<init>(IdentityManagementService.java:85)
      6 frames
    5. hudson.plugins.tfs
      TeamFoundationServerScm.checkout
      1. hudson.plugins.tfs.model.Project.getVCCHistory(Project.java:84)
      2. hudson.plugins.tfs.model.Project.getDetailedHistory(Project.java:128)
      3. hudson.plugins.tfs.actions.CheckoutAction.checkout(CheckoutAction.java:56)
      4. hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:176)
      4 frames
    6. Hudson
      AbstractBuild$AbstractBuildExecution.defaultCheckout
      1. hudson.model.AbstractProject.checkout(AbstractProject.java:1270)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609)
      2 frames
    7. jenkins.scm
      SCMCheckoutStrategy.checkout
      1. jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      1 frame
    8. Hudson
      Executor.run
      1. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:531)
      2. hudson.model.Run.execute(Run.java:1751)
      3. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      4. hudson.model.ResourceController.execute(ResourceController.java:89)
      5. hudson.model.Executor.run(Executor.java:240)
      5 frames