2
votes

Im using this https://github.com/benbaran/adal-angular4-example in my Angular app.

When I use the token from this to access Microsoft Graph API I get the following response

{
"error": {
    "code": "InvalidAuthenticationToken",
    "message": "Access token validation failure.",
    "innerError": {
        "request-id": "129e0d25-9553-4d9c-9075-5f82611e1847",
        "date": "2017-08-28T09:44:03"
    }
}

What are the alternate ways to access Graph API in my Angular app. Libraries or SDK will also help. Thanks in advance.

1

1 Answers

1
votes

There are several Angular examples available on GitHub: https://github.com/search?q=angular+sample+user:microsoftgraph&type=Repositories

The error you're getting here could have a number of root causes. One common reason for this error is mixing the v1 and v2 endpoint. Another would be failing to request the proper resource when obtaining the token. To debug the cause I would need to understand a bit more such as where you registered your application, which scopes you requested and which calls you were making into Graph.