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.
When running the following code in an azure function environment:
var storageProperties = new StorageCreationPropertiesBuilder(_cacheFileName, MsalCacheHelper.UserRootDirectory).Build();
MsalCacheHelper cache = await MsalCacheHelper.CreateAsync(storageProperties).ConfigureAwait(false);
I hit the following exception:
Exception: System.ArgumentException: Path cannot be the empty string or all whitespace. (Parameter 'path')
at System.IO.Directory.CreateDirectory(String path)
at Microsoft.Identity.Client.Extensions.Msal.CrossPlatLock..ctor(String lockfilePath, Int32 lockFileRetryDelay, Int32 lockFileRetryCount)
at Microsoft.Identity.Client.Extensions.Msal.MsalCacheHelper.CreateCrossPlatLock(StorageCreationProperties storageCreationProperties)
at Microsoft.Identity.Client.Extensions.Msal.MsalCacheHelper.CreateAsync(StorageCreationProperties storageCreationProperties, TraceSource logger)
While this code had run fine locally, we hit exceptions 100% of the time after deploying this code to our azure function. After some investigations, we realized that MsalCacheHelper.UserRootDirectory returns an empty string when in an azure function environment.
The MsalCacheHelper.UserRootDirectory code mentions that this value "Gets the user's root directory across platforms." It would be great if the azure function platform was included here!
The text was updated successfully, but these errors were encountered:
When running the following code in an azure function environment:
I hit the following exception:
While this code had run fine locally, we hit exceptions 100% of the time after deploying this code to our azure function. After some investigations, we realized that
MsalCacheHelper.UserRootDirectory
returns an empty string when in an azure function environment.The MsalCacheHelper.UserRootDirectory code mentions that this value "Gets the user's root directory across platforms." It would be great if the azure function platform was included here!
The text was updated successfully, but these errors were encountered: