Skip to content
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

MSAL 2.0.0-preview breaking change - TokenCacheExtention.Deserialize(null) throws #603

Closed
jmprieur opened this issue Aug 27, 2018 · 6 comments
Assignees
Milestone

Comments

@jmprieur
Copy link
Contributor

jmprieur commented Aug 27, 2018

Try the following code in MSAL.NET 1.1.4-preview

TokenCache tokenCache = new TokenCache();
tokenCache.Deserialize(null);

this works

now upgrade to MSAL.NET 2.0.0-preview
this throws a NullReferenceException:

  Name Value Type
  StackTrace " at Microsoft.Identity.Core.MsalIdHelper.GetMsalIdParameters()\r\n at Microsoft.Identity.Client.Internal.MsalLogger.Log(LogLevel msalLogLevel, String logMessage, Boolean containsPii)\r\n at Microsoft.Identity.Client.Internal.MsalLogger.Info(String message)\r\n at Microsoft.Identity.Core.Cache.TokenCacheSerializeHelper.DeserializeUnifiedCache(TokenCacheAccessor tokenCacheAccessor, Byte[] unifiedState, RequestContext requestContext)\r\n at Microsoft.Identity.Client.TokenCacheExtensions.Deserialize(TokenCache tokenCache, Byte[] unifiedState)\r\n at adal4_msal2.Program.d__1.MoveNext() in C:\Users\jmprieur\source\repos\local\adal4-msal2\Program.cs:line 21" string
@jmprieur
Copy link
Contributor Author

@jennyf19, @trwalke, @rayluo : FYI, this breaks a number of Web App samples.
I think we should fix it.

jmprieur added a commit to AzureAD/azure-activedirectory-library-for-dotnet that referenced this issue Aug 27, 2018
…et#603

this is a regression touching a number of Web Apps.
jmprieur added a commit to AzureAD/azure-activedirectory-library-for-dotnet that referenced this issue Aug 27, 2018
* Proposing a fix for AzureAD/microsoft-authentication-library-for-dotnet#603
this is a regression touching a number of Web Apps.

* Adding a doc comment
@jmprieur
Copy link
Contributor Author

Verified

@henrik-me
Copy link
Contributor

This is not the right fix. Have shared info via email.

@henrik-me henrik-me reopened this Aug 27, 2018
@henrik-me
Copy link
Contributor

This is not the right fix. pls. revert

@jmprieur
Copy link
Contributor Author

@henrik-me : @jennyf19 reverted it. Thanks for catching it.

@henrik-me
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants