Assets Discovery fails to export to Jira Service Management Cloud with the error "Failed to get FetchUploadCredentials"
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
Summary
On Assets Discovery import process, upload errors commonly result from using an incorrect token in the Discovery Scan settings, especially when an External Import token is mistakenly used instead of the required Discovery Import token. However, any deviation from the specific Discovery Import token can trigger this issue.
Environment
Product: Jira Service Management Cloud
Feature Involved: Assets Discovery
Diagnosis
To diagnose upload issues in the Discovery import process, examine the logs for the errors below:
[Date] [Time]: [Error] Failed to get FetchUploadCredentials from Cloud
[Date] [Time]: [Normal] HttpRequestException throw in GetFromJsonAsync
Error logs can be found in different locations based on how the Discovery scan was initiated: directly in the terminal for manual scans or within the /logs/
directory for scheduled scans.
Cause
The primary cause of errors in the Discovery import process is the use of a token that differs from the specified Discovery Import token in the Discovery Scan settings. Errors occur due to a mismatch in token type and encoding, similar to the incompatibility of using the wrong key for a lock. The issue can arise from using an External Import token or any other incorrect token input.
Solution
To resolve and prevent errors in the Discovery import process, follow these steps:
Navigate to your Discovery Import configuration (create a new configuration if you don't have one yet) and generate a new Discovery Import token. (ref: Export data from Asset Discovery to Assets Cloud)
In the Discovery common settings configuration, update the settings with the newly generated Discovery Import token.
Attempt to run the scan and import process again.
Correctly setting the Discovery Scan with the appropriate Discovery Import token addresses upload errors, ensuring a seamless import of your network devices.