Exception: certificate's CN name does not match the passed value
If you see this exception is usually means you are behind a firewall, or some proxy client that is acting as a man in the middle for SSL. SQL Azure will sometimes reject these permissions if the domain does not have a public Certificate Authority.
The fix is to turn on -T for the command line. This will force TrustServerCertificate on the connection and should resolve the issue. See this
MSDN article for more information.