Yenier Jimenez Thanks for posting your question in Microsoft Q&A. Based on the exception, it looks like you got Unauthorized exception and don't have Send
permission for the endpoint. Not sure if you are using SAS token or AD token (details are missing).
As described above screenshot, you can follow similar steps described in https://learn.microsoft.com/en-us/rest/api/servicebus/get-azure-active-directory-token and assign Service Bus Data Sender
role for the app registration or identity if you use AD. For SAS token, follow the doc https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-sas and set the right Send
for sending messages to the entity. You would face 401 Unauthorized error if there is an issue with the format of signature sent to Rest API.
Also, would like to share similar discussion https://learn.microsoft.com/en-us/answers/questions/1199184/i-created-service-bus-with-the-queue-but-when-i-tr and article https://medium.com/javarevisited/send-message-to-azure-service-bus-via-postman-using-sas-token-in-1-step-a845686baad0 that might help with your case.
If you still face the issue, share the full error message/exception, role/SAS token generation process etc. I hope this helps.
If you found the answer to your question helpful, please take a moment to mark it as "Yes" for others to benefit from your experience. Or simply add a comment tagging me and would be happy to answer your questions.