title: connect Azure Service Management with python sdk
body: <p>I'm using this guide:
  <a href="https://docs.microsoft.com/en-us/azure/cloud-services/cloud-services-python-how-to-use-service-management" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/cloud-services/cloud-services-python-how-to-use-service-management</a>.
  I'm doing exact what they wrote in the guide and I keep getting error message.</p>
  
  <pre><code>&gt;&gt;&gt; from azure import *
  &gt;&gt;&gt; from azure.servicemanagement import *
  &gt;&gt;&gt; subscription_id = '************************'
  &gt;&gt;&gt; import os
  &gt;&gt;&gt; os.path.isfile(r'c:\key\mycert.pem')
  True
  &gt;&gt;&gt; certificate_path = r'c:\key\mycert.pem'
  &gt;&gt;&gt; sms = ServiceManagementService(subscription_id, certificate_path)
  &gt;&gt;&gt; result = sms.list_locations()
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "C:\python27\lib\site-packages\azure\servicemanagement\servicemanagementservice.py", line 1131, in list_locations
  Locations)
    File "C:\python27\lib\site-packages\azure\servicemanagement\servicemanagementclient.py", line 365, in _perform_get
  response = self.perform_get(path, x_ms_version)
    File "C:\python27\lib\site-packages\azure\servicemanagement\servicemanagementclient.py", line 175, in perform_get
  response = self._perform_request(request)
    File "C:\python27\lib\site-packages\azure\servicemanagement\servicemanagementclient.py", line 339, in _perform_request
  return _management_error_handler(ex)
    File "C:\python27\lib\site-packages\azure\servicemanagement\servicemanagementclient.py", line 419, in _management_error_handler
  return _general_error_handler(http_error)
    File "C:\python27\lib\site-packages\azure\servicemanagement\_common_error.py", line 34, in _general_error_handler
  raise AzureHttpError(message, http_error.status)
  azure.common.AzureHttpError: Forbidden
  &lt;Error xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&gt;&lt;Code&gt;ForbiddenError&lt;/Code&gt;&lt;Message&gt;The server failed to authenticate the request. Verify that the certificate is valid and is associated with this subscription.&lt;/Message&gt;&lt;/Error&gt;
  </code></pre>
  
  <p>I've uploaded the mycert.cer to a cloud service in my azure portal.
  someone have an idea why the problem is?
  I'm sure that the pem and the cer files are ok.</p>