Reputation: 177
I am trying to use Postman Chrome app to make REST calls against Microsoft Azure Service Management API. However, I get the following error
<Message>The server failed to authenticate the request. Verify that the certificate is valid and is associated with this subscription.</Message>
Here is what I did.
I created a self signed certificate. I uploaded that certificate to Azure Certificate store in the management portal and added the same to the trusted root certification authorities in my windows certificate store. However, I can't still make a valid API call. Can someone guide me down the right path here.
Upvotes: 2
Views: 1827
Reputation: 2541
Enhancement of @csprabala's answer as my edit of his answer was rejected. Credits go to @csprabala.
Create a certificate using the program makecert
. You find it either in your Visual Studio command window or in another location. Run this command:
makecert -sky exchange -r -n "CN=<certname>" -pe -a sha512 -len 2048 - sv "<certname>.pvk" "<certname>.cer"
Upload the <certname>.cer
file in the settings portion of the Azure management portal .
Create a <certname>.pfx
file containing the private key with this command (program is in the same location as in 1.):
pvk2pfx.exe -pvk "<certname>.pvk" -spc "<certname>.cer" -pfx "<certname>. pfx"
Import the file <certname>.pfx
to the Windows user certificates store. You can do this in Chrome in the settings under "HTTPS/SSL" > "Manage Certificates ...". The "Personal" certificate store is appropriate.
Make the REST call using Postman.
Upvotes: 0
Reputation: 177
Finally I solved it myself. Here are the steps
1) Create a certificate using the following command in your Visual Studio Command Prompt
makecert -sky exchange -r -n "CN=<certname>" -pe -a sha1 -len 2048 -ss My <certname>.cer"
2) Upload the cer file in the settings portion of the azure management portal
3) Export a pfx file containing the private key to a location on your machine.
4) Add that pfx file to Chrome in settings certificates in trusted root certificates list
5) Make the REST call using Postman.
Upvotes: 4