-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no id_token in claims object #850
Comments
The Is there a specific field within the IdToken you are trying to access? Please note, the raw token string is not currently exposed externally; if you have a good use case for needing the unparsed token we can evaluate adding this piece of API surface |
@iambmelt Yes actually the service I am building against is using the bare token, I cannot use the broken down claims. To reconstruct them to a string is quite hard right? |
@ApostolisApo No, unfortunately you cannot reconstitute the token from the claims as the jwt signature won't match unless it is signed with the keys from STS. I am tagging this issue as a Feature Request and will follow up with the team re: offering an API to access the raw IdToken in a future release. |
Hello :) |
Hi @iambmelt, I tested the latest release (1.0.1, which solved this issue, thanks for that!). As @TaugyStyle said, I also realized the library does not expose the ID Token, whereas it does on the iOS library. We need this ID Token for the Open ID Connect (for the OAuth2). I see you tagged it as an Enhancement, do you any idea when this can be implemented? Thanks in advance! |
@TaugyStyle @Tweener I will work on an implementation for this today using MSAL; please note however, that the id token which will be exposed will be a v2 id token (more work/testing would be required to surface a v1 token). I don't have an ETA for a release on this yet; I would like to treat it as a hotfix to avoid having to run a full test-pass for what is otherwise a relatively small PR. I will post more details as I have them /cc @shoatman @hamiltonha @Om83 FYI ^^ |
* Re #850 * Rev version number -> 1.1.0 * Update changelog for 1.1.0 * Improving javadoc
@TaugyStyle @Tweener I have published a Link to release:
|
@hamiltonha ^^ We need to prepare formal documentation for publication outlining best practices/patterns for handling, using, and validating |
Regarding usage, the For non-guest scenarios: authenticationResult.getAccount().getIdToken(); For tenant-guest scenarios: ((IMultiTenantAccount) authenticationResult.getAccount()).getTenantProfiles().get("<tenant_id>").getIdToken(); |
Thanks a lot @iambmelt for your reactivity! I'm gonna try that right away and let you know how it goes. |
Incredible thanks ! Will try soon :) |
Works like a charm! Thanks a lot @iambmelt :) |
Thanks for verifying @Tweener 👍 |
Describe the bug
Have the same problem both in my app and in msalandroidkotlinapp example app. I am filling in my Azure details and when handling AuthenticationCallback in both:
the claims object does not contain id_token. The access token and everything else is acquired properly
Smartphone
To Reproduce
Replace the details in .json file with your Azure App details and run the msalandroidkotlinapp example app. Choose to sign in with in the single application fragment. If you inspect the url of the login page you can see that in the URL parameter there is this: response_type=code. Should it be like this? Shouldn't it be response_type=token id_token ?
Expected behavior
An id_token should be present in the claims object
Actual Behavior
The id_token is missing from the claims object
The claims object is missing id_token even if I call IMultipleAccountPublicClientApplication.getAccount(id)
The text was updated successfully, but these errors were encountered: