benbaran / adal-angular6-example

Angular 6 ADAL Authentication Example
20 stars 13 forks source link

Not able to retrieve profile #5

Open mchint01 opened 6 years ago

mchint01 commented 6 years ago

We are not able to retrieve profile section, receiving this error: Invalid_state. state: 23f3882e-d370-4860-94a5-bd98b818ae89|00000003-0000-0000-c000-000000000000

config: { tenant: 'XXXXXXX.onmicrosoft.com', clientId: 'XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX', endpoints: { 'https://graph.microsoft.com': '00000003-0000-0000-c000-000000000000' }, cacheLocation: 'localStorage' }

We also gave the following permissions on Azure AD: required permissions 1

Microsoft Graph App Permissions: app permissions for microsoft graph 2

Delegate permissions for Windows Azure AD delegate permissions for windows azure ad 3

ahmadezzeir commented 5 years ago

same here

vishwanathsunkari commented 5 years ago

i am also facing this issue , and what i found that in the token we are receiving using adal0angular 4 in implicit flow , is not having nonce property. graph will allow only if the token header contains nonce . and i am not able to get the nonce in the header using implicit way using angular 7 and adal-angular 4 .

if you find anything please let me know .

my config is: config: { response_type: 'id_token', tenant: 'my tenant', clientId: 'my client', endpoints: { 'https://graph.microsoft.com': '00000003-0000-0000-c000-000000000000' }, redirectUri: 'http://localhost:4200/', response_mode:'form_post', state:'12345s'
}

the errror is : 401 Not authorized