Welcome to Microsoft Q&A platform and thanks for posting your question here.
Regarding the error you are experiencing, as you mentioned, the 401 Unauthorized error states that the server has rejected the credentials provided for the REST API call. This error can occur if the access token is not passed correctly or if the token does not have the necessary permissions.
To address your questions:
Passing the Token on Both Source and Sink Side:
Yes, you generally need to pass the access token on both the source and the sink side in Azure Data Factory. The access token should be included in the header of the API requests to authenticate and authorize the operations.
Reason for Sink Side Error:
The error on the sink side could be happening because the access token is not being passed correctly, the token has expired, or the token does not have the correct permissions to write to the sink. Ensure that the token is valid, not expired, and has the necessary permissions for the operations you are trying to perform.
The response you received states that the credentials (in this case, the access token) provided in the REST API call are incorrect or not authorized. This means that the server is not allowing the operation to proceed because it does not recognize the credentials as valid or sufficient for the requested action.
Make sure that the access token is being passed correctly in the API call headers and that the token has the required permissions. If you continue to experience issues, you want to test the API call outside of Azure Data Factory using a tool like Postman to ensure that the credentials work as expected. Additionally, reviewing the permissions and settings in Business Central and Azure Data Factory can help identify any configuration issues.
Reference:
https://stackoverflow.com/questions/73760418/how-to-pass-bearer-token-api-in-azure-data-factory
I hope this information helps you. Let me know if you have any further questions or concerns.