Hi @Zhuoqiong Mo
Welcome to Microsoft Q&A platform and thanks for posting your question here.
I understand that you're facing an issue with the Copy Data activity in Azure Synapse Workspace while trying to store data from JIRA Tempo Account into your Azure Storage Account.
Firstly, you've successfully created a new linked service with REST API and stored the API Token for the Tempo Account in Azure Key Vault. The test connection is successful, which indicates that the basic connectivity to the JIRA Tempo server is established.
Secondly, you've created an integration dataset, DS_jira, with REST API that connects with the linked service. The relative URL tempo-getWorklog/ is added, and the test connection is successful again, suggesting that the dataset is configured correctly to reach the endpoint.
The error occurs when you attempt to preview the data: “Rest call failed with client error, status code 401 Unauthorized, please check your activity settings.” This error states that the authentication credentials provided are not valid or not being accepted by the JIRA Tempo API.
To troubleshoot and resolve the issue, here are the steps you can take:
- Review the REST API configuration in the linked service and dataset. Ensure that the authentication type, server name, and relative URL are correctly specified.
- Verify that the API token has the correct permissions and is valid. Also, ensure that the token is being retrieved correctly from Azure Key Vault and passed to the REST API call.
- Check the JIRA Tempo API documentation to see if you need to include additional headers such as Authorization: Bearer <token> for authentication.
- Ensure that the relative URL tempo-getWorklog/ is correctly formatted and corresponds to a valid API endpoint for JIRA Tempo.
- If the JIRA Tempo API endpoint requires a POST request with a request body, ensure that you’re not mistakenly using a GET request. Use POST instead of GET.
I hope this helps you resolve the issue. Let me know if you have any further questions or concerns.