Closed goggenb closed 6 years ago
just curious did you decrypt id_token and see the values in that are correct ? does it have userName object ?
It does not have userName. It has email, name, and unique_name of those containing my name/username
my guess is you need to setup scopes property . is it on prem ADFS or AZURE AD ? if its on prem ADFS this might help
it has some screen shots . look at point 13
You are correct that it was a configuration issue. ClientID was set up wrong, and once we got that set correctly, getUser() is no longer null. The decoded token does still not contain a userName though :P This is azure AD by the way.
Thanks for the help guiding me to the solution.
I am having troubles with handleWindowCallback. After it is called, getUser still return null.
I have stepped through adal.service in debug and it gets a hash from the url and says it is valid. When it comes to line 98 in adal.service typeof this.context.callback === 'function' returns false and it jumps to removing hash from url.
This is the first time I am using the adal library so I am not sure what is supposed to happen here, but it seems to me login from AD is successful, but the user is not saved correctly in adal.
Here is what my requestInfo looks like:
parameters: { id_token: "eyJ0eXAiOiJKV1Q....", session_state: "407c45df....", state: "9daf2194..." }, requestType: "LOGIN", stateMatch: true, stateResponse: "9daf2194....". valid: true