Am pretty new to angular-oauth2-oidc, Unable to access the Microsoft Graph API, using the graph token that we get as the id_token in angular-oauth2-oidc.
the AuthConfig
export const authCodeFlowConfig: AuthConfig = {
// Url of the Identity Provider
issuer: '<sample_issuer>',
// URL of the SPA to redirect the user to after login
redirectUri: window.location.origin+"/",
responseType: 'id_token',
clientId: 'client_id', //ApplicationID
strictDiscoveryDocumentValidation:false,
oidc: true,
scope: 'openid, profile, email, api, User.Read',
showDebugInformation: true,
timeoutFactor: 0.01,
}
Here my assumption would be once the authentication is successful then that graph token would have enough permission to access the
But when I am trying to hit the endpoint with the token that I get from the oidc authentication using the postman am getting the following error
While decoding the token using jwt.io, I can find that the token doesn't have profile or any other scopes enabled.
I tried using the sample application from angular-oauth2-oidc https://github.com/manfredsteyer/angular-oauth2-oidc/tree/master/projects/quickstart-demo
Below is the code sample to trigger the login
Any help or guidance will be appreciated. Thanks!