Quantcast
Channel: Azure Active Directory forum
Viewing all articles
Browse latest Browse all 16000

Azure Graph API - Versioning - ADAL

$
0
0

Hi - I am using the Microsoft.Samples.Adal.TelemetryServiceClient sample as a base to starting programming the WaaD Graph API. This is after failing to get a token using the MvcDirectoryGraphSample.Controllers.UserController sample.

Currently here are my confusion points :

1 - The line  authenticationResult = authenticationContext.AcquireToken(resource, clientCred); returns a succesful token.

2 - If I append the version to the request url, " https://graph.windows.net/2dc2216a-5ea3-4dc7-8906-47ab98f80f67/Users?api-version=1.0" , (or api-version=2013-04-05) - I get the following error :

Status = 401    Unauthorized

{"odata.error":{"code":"Authentication_MissingOrMalformed","message":{"lang":"en
","value":"Access Token missing or malformed."}}}

If I remove the version numberso that the url is "https://graph.windows.net/2dc2216a-5ea3-4dc7-8906-47ab98f80f67/Users" , I get a different error 

Status = 400    BadRequest

{"odata.error":{"code":"Request_DataContractVersionMissing","message":{"lang":"e
n","value":"The specified api-version is invalid. The value must exactly match a  supported version."}}}

I am new to Azure, but have a major project base on this. Can anyone out there please help? What am I doing wrong with the token acquisition (which I am getting correctly) or the versioning? Has anyone successfully been able to call at least one of Graph REST APIs from any kind of client? Initially I have been through hell just getting the token. 

Thanks.

Festus


Viewing all articles
Browse latest Browse all 16000

Trending Articles



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