You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.
app = PublicClientApplicationBuilder.Create(clientId).WithTenantId(tenant).WithAuthority(authority).Build();
StorageCreationPropertiesBuilder storageCreationPropertiesBuilder = new StorageCreationPropertiesBuilder("tokenCache.dat", "tokencache", clientId).
WithLinuxKeyring("test", "default", "Get Access Token",
new System.Collections.Generic.KeyValuePair<string, string>("Version", "1"),
new System.Collections.Generic.KeyValuePair<string, string>("ProductGroup", "Test")).WithMacKeyChain("Test", "default");
var task = Task.Run(async () => await MsalCacheHelper.CreateAsync(storageCreationPropertiesBuilder.Build()));
MsalCacheHelper msalCacheHelper = task.Result;
try
{
msalCacheHelper.RegisterCache(app.UserTokenCache);
Task<AuthenticationResult> result = app.AcquireTokenByIntegratedWindowsAuth(scopes).WithUsername(username).ExecuteAsync();
Console.Write(result.Result.AccessToken);
}
I am using Microsoft.Identity.Client -> 4.15.0 and Microsoft.Identity.Client.Extensions -> 2.12.0. The issue is that tokencache folder gets created but tokenCache.dat doesnt get created. I am having the DLLs downloaded from the respective Nuget packages and adding them as a Reference in the .NET core console project.
This works absolutelyt fine and cache file gets created If I directly link the package from Nuget package manager. I am not really sure what is happening here. It might not be a bug, but want to see if anyone can help here?
The text was updated successfully, but these errors were encountered:
Hi @hiteshdasikamw - so it looks like things are working well if you are using NuGet packages, but not so good if you are using DLLs. Obvious solution is to not use DLLs :) as can be difficult to reproduce what NuGet is trying to do.
MSAL has a pretty complex build output, as it creates both lib and ref assemblies. You should reference the lib assembly, as the ref assemblies have no code.
bgavrilMS
changed the title
[Bug] token cache file not getting created when using Integrated Windows Authentication
[Bug] token cache file not getting created when using DLLs not NuGets
Oct 13, 2020
bgavrilMS
changed the title
[Bug] token cache file not getting created when using DLLs not NuGets
[Bug] token cache file not getting created when referencing DLLs instead of nupkg
Oct 13, 2020
I am using Microsoft.Identity.Client -> 4.15.0 and Microsoft.Identity.Client.Extensions -> 2.12.0. The issue is that tokencache folder gets created but tokenCache.dat doesnt get created. I am having the DLLs downloaded from the respective Nuget packages and adding them as a Reference in the .NET core console project.
This works absolutelyt fine and cache file gets created If I directly link the package from Nuget package manager. I am not really sure what is happening here. It might not be a bug, but want to see if anyone can help here?
The text was updated successfully, but these errors were encountered: