Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Unreachable ADFS server results in misleading error message #80

Closed
RandalliLama opened this issue Sep 11, 2015 · 0 comments
Closed

Unreachable ADFS server results in misleading error message #80

RandalliLama opened this issue Sep 11, 2015 · 0 comments
Assignees
Labels

Comments

@RandalliLama
Copy link
Contributor

I tried running a u/p test that failed. I realized that my ADFS server was unreachable. However, the error message produced by ADAL indicates that there is a problem with the version of WS-Trust detected at ADFS. Clearly that can't be right. We should fix this up so the actual error is clear.

Here are logs:

Fri, 11 Sep 2015 03:41:30 GMT:4779a602-8964-4403-a092-1b771902eeaa - Authority: VERBOSE: Performing instance discovery: https://login.windows.net/
Fri, 11 Sep 2015 03:41:30 GMT:4779a602-8964-4403-a092-1b771902eeaa - Authority: VERBOSE: Performing static instance discovery
Fri, 11 Sep 2015 03:41:30 GMT:4779a602-8964-4403-a092-1b771902eeaa - Authority: VERBOSE: Authority validated via static instance discovery.
Fri, 11 Sep 2015 03:41:30 GMT:4779a602-8964-4403-a092-1b771902eeaa - TokenRequest: INFO: Acquiring token with username password
Fri, 11 Sep 2015 03:41:30 GMT:4779a602-8964-4403-a092-1b771902eeaa - CacheDriver: VERBOSE: finding with query:{"clientId":"624ac9bd--b56a8991cfb3","userId":""}
Fri, 11 Sep 2015 03:41:30 GMT:4779a602-8964-4403-a092-1b771902eeaa - CacheDriver: VERBOSE: Looking for potential cache entries:
Fri, 11 Sep 2015 03:41:30 GMT:4779a602-8964-4403-a092-1b771902eeaa - CacheDriver: VERBOSE: {"_clientId":"624ac9bd--b56a8991cfb3","userId":""}
Fri, 11 Sep 2015 03:41:30 GMT:4779a602-8964-4403-a092-1b771902eeaa - CacheDriver: VERBOSE: Found 0 potential entries.
Fri, 11 Sep 2015 03:41:30 GMT:4779a602-8964-4403-a092-1b771902eeaa - TokenRequest: VERBOSE: No appropriate cached token found.
Fri, 11 Sep 2015 03:41:30 GMT:4779a602-8964-4403-a092-1b771902eeaa - UserRealm: VERBOSE: Performing user realm discovery at: https://login.windows.net/common/UserRealm/?api-version=1.0
Fri, 11 Sep 2015 03:41:30 GMT:4779a602-8964-4403-a092-1b771902eeaa - UserRealm: INFO: User Realm DiscoveryServer returned this correlationId: 4779a602-8964-4403-a092-1b771902eeaa
Fri, 11 Sep 2015 03:41:30 GMT:4779a602-8964-4403-a092-1b771902eeaa - UserRealm: VERBOSE: Discovery response:
{"ver":"1.0","account_type":"Federated","domain_name":"naturalcauses.com","federation_protocol":"WSTrust","federation_metadata_url":"https://fs.naturalcauses.com/adfs/services/trust/mex","federation_active_auth_url":"https://fs.naturalcauses.com/adfs/services/trust/2005/usernamemixed"}
Fri, 11 Sep 2015 03:41:30 GMT:4779a602-8964-4403-a092-1b771902eeaa - UserRealm: VERBOSE: UserRealm response:
Fri, 11 Sep 2015 03:41:30 GMT:4779a602-8964-4403-a092-1b771902eeaa - UserRealm: VERBOSE:  AccountType:             federated
Fri, 11 Sep 2015 03:41:30 GMT:4779a602-8964-4403-a092-1b771902eeaa - UserRealm: VERBOSE:  FederationProtocol:      wstrust
Fri, 11 Sep 2015 03:41:30 GMT:4779a602-8964-4403-a092-1b771902eeaa - UserRealm: VERBOSE:  FederationMetatdataUrl:  https://fs.naturalcauses.com/adfs/services/trust/mex
Fri, 11 Sep 2015 03:41:30 GMT:4779a602-8964-4403-a092-1b771902eeaa - UserRealm: VERBOSE:  FederationActiveAuthUrl: https://fs.naturalcauses.com/adfs/services/trust/2005/usernamemixed
Fri, 11 Sep 2015 03:41:30 GMT:4779a602-8964-4403-a092-1b771902eeaa - TokenRequest: VERBOSE: Acquiring token with username password for federated user
Fri, 11 Sep 2015 03:41:30 GMT:4779a602-8964-4403-a092-1b771902eeaa - TokenRequest: VERBOSE: Attempting mex at: https://fs.naturalcauses.com/adfs/services/trust/mex
Fri, 11 Sep 2015 03:41:30 GMT:4779a602-8964-4403-a092-1b771902eeaa - MEX: VERBOSE: Mex created with url: https://fs.naturalcauses.com/adfs/services/trust/mex
Fri, 11 Sep 2015 03:41:30 GMT:4779a602-8964-4403-a092-1b771902eeaa - MEX: VERBOSE: Retrieving mex at: https://fs.naturalcauses.com/adfs/services/trust/mex
Fri, 11 Sep 2015 03:41:30 GMT:4779a602-8964-4403-a092-1b771902eeaa - MEX: ERROR: Mex Get request failed with
Stack:
Error: getaddrinfo ENOTFOUND
    at errnoException (dns.js:37:11)
    at Object.onanswer [as oncomplete] (dns.js:124:16)
{ [Error: getaddrinfo ENOTFOUND] code: 'ENOTFOUND', errno: 'ENOTFOUND', syscall: 'getaddrinfo' }
Fri, 11 Sep 2015 03:41:30 GMT:4779a602-8964-4403-a092-1b771902eeaa - TokenRequest: WARNING: MEX exchange failed.  Attempting fallback to AAD supplied endpoint.
Fri, 11 Sep 2015 03:41:30 GMT:4779a602-8964-4403-a092-1b771902eeaa - WSTrustRequest: ERROR: Unsupported wstrust endpoint version. Current support version is wstrust2005 or wstrust13.
Stack:
Error: Unsupported wstrust endpoint version. Current support version is wstrust2005 or wstrust13.
    at Logger.createError (D:\git\npm-test\node_modules\adal-node\lib\log.js:201:13)
    at WSTrustRequest.acquireToken (D:\git\npm-test\node_modules\adal-node\lib\wstrust-request.js:203:25)
    at TokenRequest._performWSTrustExchange (D:\git\npm-test\node_modules\adal-node\lib\token-request.js:274:11)
    at TokenRequest._performUsernamePasswordForAccessTokenExchange (D:\git\npm-test\node_modules\adal-node\lib\token-request.js:299:8)
    at D:\git\npm-test\node_modules\adal-node\lib\token-request.js:359:12
    at Request._callback (D:\git\npm-test\node_modules\adal-node\lib\util.js:119:7)
    at self.callback (D:\git\npm-test\node_modules\request\request.js:368:22)
    at Request.emit (events.js:95:17)
    at Request.onRequestError (D:\git\npm-test\node_modules\request\request.js:1025:8)
    at ClientRequest.emit (events.js:95:17)
[Error: Unsupported wstrust endpoint version. Current support version is wstrust2005 or wstrust13.]
Fri, 11 Sep 2015 03:41:30 GMT:4779a602-8964-4403-a092-1b771902eeaa - TokenRequest: VERBOSE: getTokenFunc returned with err
well that didn't work: Error: Unsupported wstrust endpoint version. Current support version is wstrust2005 or wstrust13.
    at Logger.createError (D:\git\npm-test\node_modules\adal-node\lib\log.js:201:13)
    at WSTrustRequest.acquireToken (D:\git\npm-test\node_modules\adal-node\lib\wstrust-request.js:203:25)
    at TokenRequest._performWSTrustExchange (D:\git\npm-test\node_modules\adal-node\lib\token-request.js:274:11)
    at TokenRequest._performUsernamePasswordForAccessTokenExchange (D:\git\npm-test\node_modules\adal-node\lib\token-request.js:299:8)
    at D:\git\npm-test\node_modules\adal-node\lib\token-request.js:359:12
    at Request._callback (D:\git\npm-test\node_modules\adal-node\lib\util.js:119:7)
    at self.callback (D:\git\npm-test\node_modules\request\request.js:368:22)
    at Request.emit (events.js:95:17)
    at Request.onRequestError (D:\git\npm-test\node_modules\request\request.js:1025:8)
    at ClientRequest.emit (events.js:95:17)
amishra-dev pushed a commit that referenced this issue Apr 25, 2016
This is a fix for issues #71, #78 , and #80
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants