Welcome to Microsoft Q&A! Thanks for posting the question.
As per the error message your connection string is not in the right format. Please make sure you are copying the primary/secondary connection string from the portal and you are not removing any part of the connection string while copying it from the portal. If someone has provided you the connecting string then make sure there is no special character in the connection string. You can use the command prompt (cmd) and paste it to verify if there were any special characters or use ASCII formatting.
The connection string format will be :
Endpoint=sb://{yournamespacename}.servicebus.windows.net/;SharedAccessKeyName={yourSharedAccessKeyName};SharedAccessKey={yourSharedAccessKey}
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.