Hi,
I'm getting 'java.lang.StackOverflowError' exception from authenticationResult.account() when both accountCacheEntity and account are null;
|
if (authenticationResult.account() != null) { |
Scenario causing the issue is,
-
Trying to fetch token using ConfidentialClientApplication acquireToken(ClientCredentialParameters parameters) method.
-
Able to successfully fetch the token by passing ClientCredentialParameters. Responses received are
httpResponse :{"token_type":"Bearer","expires_in":3600,"ext_expires_in":3600,"access_token":"<ACTUAL_TOKEN>"}
TokenResponse : tokens = {"access_token":"<ACTUAL_TOKEN>","id_token":"","token_type":"Bearer","expires_in":3600}
-
The AuthenticationResult received in the TokenRequest.java class contains valid values for "accessToken", "extExpiresOn", "expiresOn" and "environment". All other fields including accountCacheEntity and account are null.
-
When accountCacheEntity and account is null, authenticationResult.account() in the TokenCache.java class is throwing 'java.lang.StackOverflowError' for account field.

Is this an open issue? or please let me know if I am missing something. Thanks in advance.
Hi,
I'm getting 'java.lang.StackOverflowError' exception from authenticationResult.account() when both accountCacheEntity and account are null;
microsoft-authentication-library-for-java/src/main/java/com/microsoft/aad/msal4j/TokenCache.java
Line 237 in 6b18408
Scenario causing the issue is,
Trying to fetch token using ConfidentialClientApplication acquireToken(ClientCredentialParameters parameters) method.
Able to successfully fetch the token by passing ClientCredentialParameters. Responses received are
httpResponse :{"token_type":"Bearer","expires_in":3600,"ext_expires_in":3600,"access_token":"<ACTUAL_TOKEN>"}
TokenResponse : tokens = {"access_token":"<ACTUAL_TOKEN>","id_token":"","token_type":"Bearer","expires_in":3600}
The AuthenticationResult received in the TokenRequest.java class contains valid values for "accessToken", "extExpiresOn", "expiresOn" and "environment". All other fields including accountCacheEntity and account are null.
microsoft-authentication-library-for-java/src/main/java/com/microsoft/aad/msal4j/TokenRequest.java
Line 113 in 6b18408
When accountCacheEntity and account is null, authenticationResult.account() in the TokenCache.java class is throwing 'java.lang.StackOverflowError' for account field.
Is this an open issue? or please let me know if I am missing something. Thanks in advance.