Invalid email error in access token

Aug 12, 2015 at 3:18 PM
Hi there,

In the GetAccessToken() method of the Utils class, there is a request to the access_token. However mine always fails and throws an invalid_grant "Not a valid email" exception in the _result. When I use the .NET Quickstart solution, I am able to connect no problem https://developers.google.com/admin-sdk/directory/v1/quickstart/dotnet

For your reference:

_tokenEndPoint is: "https://www.googleapis.com/oauth2/v3/token"

_payload looks like:
{
"sub": "admin@mycompany.com", "iss": "4235XXXXX977-bhcjq8i2XXXXXX94hudq7b1l6869XXXX@developer.gserviceaccount.com", "scope": "https://www.googleapis.com/auth/admin.directory.user https://www.googleapis.com/auth/admin.directory.group",
"aud": "https://www.googleapis.com/oauth2/v3/token",
"exp": 1439395616,
"iat": 1439392316
}

Is there something missing? I've followed the guide with all the MA parameters to a tee.

Thanks!
Coordinator
Feb 4, 2016 at 3:07 PM
Hi,

Did you grant permission to API client on admin console?