Welcome to the Alteryx Knowledge Base
Knowledge Base / Server / The test "Error retrieving authorization token" failed: ExpectedNumREcords==0, NumRecords(#1)==...
The test "Error retrieving authorization token" failed: ExpectedNumREcords==0, NumRecords(#1)==1
Created/Edited -
Summary
Description
Unable to connect to API endpoint Using Server IP address, with Server API Connector.
The test "Error retrieving authorization token" failed: ExpectedNumREcords==0, NumRecords(#1)==1
Issue
Environment
- Server 2022.3
- Base Address and Webapi base URL in System Setting have been configured to use FQDN
- Server API Connector Tool
Cause
1. The Web API Base URL has been configured for another IP address or FQDN.
- The Base Address and the Web API Address are required to be set to match, if the base address is using a FQDN, then the WebAPI call will need to use the same that is set in System Settings.
- It is possible to use a Canonical address so that both the FQDN and an IP address could be called, allowing the API to resolve both ways (See Solution C)
2. The Server is not reachable.
- Are API calls being made from an external network or off the VPN? Potentially, the Web API Base address cannot be called externally due to security restrictions (e.g. Firewall, VPN, Proxy restrictions)
3. AlteryxService might not be running, preventing Gallery and AlteryxServerHost responses.
- Check that Gallery is accessible and if not verify with the Admin that AlteryxService is running on the Gallery node.
Resolution
Solutions:
A. Confirm the valid FQDN to use to reach Server
- Change the API URL that was entered into the Connector configuration (or your 3rd party app making API requests) from http://{ipAddress}/webapi to the live Web API Address shown in Alteryx System settings http:/{domainName}/webapi
B. Verify with your IT department security rules (firewall) is not preventing network access
C. Add a Canonical Name that uses the Server's IP Address:
Below is a valid response and bearer token once the Server API connector can reach the Web API URL successfully:
Note: 3rd party API calls (e.g. Postman, Insomnia, etcetera) may encounter similar issues cause by the same configuration items addressed above
Was this article helpful?