MicroSoft Windows Azure REST API ISSUE RRS feed

  • Question

  • We are trying to execute Azure REST API through mozilla firefox restClient.But we are not getting the proper response.

    I am hitting the below rest apiurl :


    getting the below error :

    1. Status Code: 403 Forbidden
    2. Content-Length: 0
    3. Date: Wed, 24 Jul 2013 10:31:06 GMT
    4. Server: Microsoft-HTTPAPI/2.0

    I am suspeting that do i need to pass any other parameters with the above URL and how do i pass the request body with that url?.

    can you please explain how do i use the azure rest api url's through browser directly.

    Please provide the proper steps to access it.kindly do not share any links it is not clear.



    Wednesday, July 24, 2013 12:41 PM

All replies

  • 403 error means the request is not authenticated. You would need to attach a management certificate along with your request. Please take a look here for authenticating Azure Service Management REST API calls: http://msdn.microsoft.com/en-us/library/windowsazure/ee460782.aspx.

    • Proposed as answer by dsmwb Thursday, July 25, 2013 1:23 AM
    Wednesday, July 24, 2013 2:36 PM
    • Edited by dsmwb Thursday, July 25, 2013 12:56 AM add info
    • Proposed as answer by dsmwb Thursday, July 25, 2013 1:23 AM
    Thursday, July 25, 2013 12:52 AM
  • Hi Garav,

    Thanks for your reply.

    While creating the Azure account cerificate created in azure portal.

    when i hit the url "https://management.core.windows.net/<subscription-id>/locations" from the IE10 browser it's it's displaying the cerificate to select.Once i selected that certificate it's failing to authenticate.can you please elaborate on this issue that will be very helpful for us.

    And one mote thing we are not doing any c# code can you explain can access the url's directly from browser.



    Thursday, July 25, 2013 7:16 AM
  • You need a specific certificate, plese refer to:


    • Proposed as answer by dsmwb Thursday, July 25, 2013 11:17 AM
    Thursday, July 25, 2013 11:17 AM
  • So I tried it in IE 10 and got prompted for a certificate. I selected the proper certificate and got a 400 error code which is correct. If you look at the documentation for List Locations (http://msdn.microsoft.com/en-us/library/windowsazure/gg441293.aspx), you'll notice that you would need to specify "x-ms-version" request header in your request. I'm not sure how you would do it by typing the address directly in the browser's address bar. Can you describe why you would want to invoke Service Management API directly in the browser? Just curious!!!
    Thursday, July 25, 2013 11:18 AM
  • Hi Gaurav,

    We have a requirement like this:

    If we are able to access from browser,If we get the proper response from the Azure portal.

    The same URL we need to pass in our Http Cline GET Operations(internal OO Operations) in our flows to get the response form Azure.

    But the thing here,We are not sure either we can access the Azure REST Calls directly from browser.

    our leaders asking to access directly as they did they are able to access the internal REST API'S.

    For internal REST API'S they do not need any certifications.with out any code we can access the internal REST API'S from browser.

    Can you clarify azure has any restrictions to access the API directly from browser.Becase wh i am asking is as I searched so many websites In that i found the examples no body is using my approach

    they are passing the header's information in c#,java some thing like code.

    The same thing i tried with mozilla firefox restClient there we can set the x-ms-version header as it  needed.Then also we are getting the "403 Forbidden Exception".

    Even this is sample GET Method,But in our requirement we have to use POST also.In POST for provisioning the VM'S and have some operations. there is a request body to pass.In this case how can we pass through url.

    Can you explain how we will solve the 403 Exception.



    Thursday, July 25, 2013 11:56 AM
  • Of course you can also access the REST API from the browser, but in any case you have to provide the proper certificate, you cannot access REST API URIs without a certificate.

    Thursday, July 25, 2013 12:02 PM
  • Hi

    Cerificate means do we need to create in our local.If that is the case I have done that as per the above link.

    If we access from the browser how we will point the cerificate in URL.

    Can you elaborate on this clearly.

    The same thing we are able to access through CURL Commands.

    curl --insecure -E "C:\Program Files (x86)\GnuWin32\bin\azure-cert.pem" -x "" -H "x-ms-version: 2011-10-01" "https://management.core.windows.net/<subscriptionid>/locations"

    here i am pointing the certificate in local.

    through browser what to do.



    Thursday, July 25, 2013 12:14 PM
  • I think this link may help:


    (you cannot use the URL to provide the certificate)
    • Edited by dsmwb Thursday, July 25, 2013 12:31 PM add info
    Thursday, July 25, 2013 12:29 PM
  • Hi Gaurav,

    The above certification issue got resolved.We have just installed the management certificate in mozilla fire fox browser.Then it's working.

    Now we have one problem with VM.I have just created the Windows VM manually in the Azure Portal.That VM If we tried to connect by clicking connect option it's downloading RDP file.If we double click that RDP FILE it's giving the  error remote desktop can not be connect to the remote computer for one of the reasons.

    Can you explain do we need to enable some of the options.




    Friday, July 26, 2013 11:58 AM
  • reboot the machine and configure the RDP access from the azure management panel, this should resolve any RDP issue.
    Friday, July 26, 2013 5:01 PM
  • Hi Dsmwb,

    Can you please eloborate how to configure RDP Access in our management portal.



    Monday, July 29, 2013 7:10 AM