@Daya Sandhu Is there any restriction with network on the machine that you are running this sample? I see you are using your resources custom domain as endpoint but the client is unable to connect to it. The most likely reason for this could be
- The access to the endpoint on port 443 from the machine on which this sample is run
- The endpoint URL is incorrect.
Could you please cross verify these scenarios?
For the first point you can run the same sample from a different machine or check if a proxy is enabled that is restricting access to the endpoint.
For the second point you can cross check the URL from Azure portal for this resource.
I have run the sample for test and it seems to work as expected.