The error message "Unauthorized (status code 401)" indicates that the authorization failed. It seems that the issue is with the authorization header. You can try to check the following things:
Verify that the shared access signature (SAS) token is correct, correctly encoded, has not expired, is for the correct resource, has the correct permissions, is for the correct endpoint and API version and namespace. Also, verify that it's setup for the correct hub, entity, and policy.
Can you please check these items and let us know if these suggestions resolve the issue? If not, please let us know so we can assist you further.