Quantcast
Channel: Azure Management Portal forum
Viewing all articles
Browse latest Browse all 4189

CreateSubscriptionClient - ForbiddenError when trying to get subscription data

$
0
0

I am able to call all of the Service management API code with no issue but it fails when calling the code to get the subscription details


            try
            {
                SubscriptionClient client = CloudContext.Clients.CreateSubscriptionClient(_creds);
                return client.Subscriptions.List().Subscriptions;
            catch (Exception e)
            {

The SubscriptionClient gets created just fine but trying to use it this exception occurs:

ForbiddenError: The server failed to authenticate the request. Verify that the certificate is valid and is associated with this subscription.

....\packages\Microsoft.WindowsAzure.Management.1.2.0\lib\net40\Microsoft.WindowsAzure.Management.dll
Runtime version v4.0.30319
Version 1.0.0.0

API Version 2013-08-01

All the other CreateXXXClient(creds) work and I can get all the data I have asked for so far but trying to get the list of subscriptions fails.
Maybe something I don't understand about subscriptions but given that I have a subscriptionid and the cert and can get all the other data why is the subscription information forbidden?

I am trying to understand all I can and this one has me stumped.  I can only guess I need a "super" subscriptionid and cert to get all of the subscription info but that concept does not seem to be around so ....  Any information on this issue would be most appreciated.


            

Rig Lee


Viewing all articles
Browse latest Browse all 4189

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>