none
Issue with AcquireTokenAsync while working with Graph API

    Question

  • I am working on an application to check if a particular User is present in an Active Directory group or not.

    I am using the following code:

    var authContext = new AuthenticationContext(authority);
            ClientCredential clientCredential = new ClientCredential(clientId, appKey);
            string token = "";
            try
            {
                var authresult = await authContext.AcquireTokenAsync("https://graph.windows.net", clientCredential);
                token = authresult.AccessToken;
            }

    This is always giving me an Invalid Client Secret Key error despite giving correct values for any newly created app.

    However, If I try with an older secret key it is giving me correct results.

    Could it be a case where newly created ClientKeys take some time to replicate?

    • Moved by Mike Laughlin Wednesday, June 29, 2016 3:22 PM From 'Forums Issues' - not reporting an issue with the forums.
    Wednesday, June 29, 2016 3:21 PM

Answers

All replies