public async Task <IMsalResult> SilentLoginAsync(string policy)
        {
            try
            {
                var accounts = await AuthClient.GetAccountsAsync();

                var builder = AuthClient.AcquireTokenSilent(Config.Scopes, accounts.FirstOrDefault());

                if (Config.IsB2C)
                {
                    builder.WithB2CAuthority(Config.GetB2CAuthority(policy));
                }

                var authResult = await builder.WithForceRefresh(true)
                                 .ExecuteAsync();

                _authResult.OnNext(authResult);
                _accessToken.OnNext(authResult.AccessToken);
                return(new MsalResult(authResult));
            }
            catch (Exception ex)
            {
                return(new MsalResult(ex));
            }
        }
        public async Task <AuthenticationResult> SilentLoginAsync(string policy)
        {
            AuthenticationResult result = null;

            try
            {
                var accounts = await AuthClient.GetAccountsAsync();

                result = await AuthClient.AcquireTokenSilent(Options.Scopes, accounts.FirstOrDefault())
                         .WithB2CAuthority(Options.GetB2CAuthority(policy))
                         .WithForceRefresh(true)
                         .ExecuteAsync();
            }
            catch (Exception ex)
            {
                LogException(ex, "SilentLoginAsync", policy);
            }

            return(result);
        }