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 :
- Status Code: 403 Forbidden
- Content-Length: 0
- Date: Wed, 24 Jul 2013 10:31:06 GMT
- 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.
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
You need a certificate to access Azure REST API.
Please refer to: http://msdn.microsoft.com/en-us/library/windowsazure/ee460799.aspxand to: http://msdn.microsoft.com/en-us/library/windowsazure/ee460782.aspx
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.
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!!!
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.
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 "188.8.131.52:8080" -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.
I think this link may help:
- Edited by dsmwb Thursday, July 25, 2013 12:31 PM add info
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.