public MicrosoftAppCredentials(string appId = null, string password = null)
        {
            MicrosoftAppId       = appId ?? SettingsUtils.GetAppSettings(MicrosoftAppIdKey);
            MicrosoftAppPassword = password ?? SettingsUtils.GetAppSettings(MicrosoftAppPasswordKey);
#if NET45
            if (appId == null)
            {
                MicrosoftAppId = ConfigurationManager.AppSettings[MicrosoftAppIdKey] ?? Environment.GetEnvironmentVariable(MicrosoftAppIdKey, EnvironmentVariableTarget.Process);
            }

            if (password == null)
            {
                MicrosoftAppPassword = ConfigurationManager.AppSettings[MicrosoftAppPasswordKey] ?? Environment.GetEnvironmentVariable(MicrosoftAppPasswordKey, EnvironmentVariableTarget.Process);
            }
#endif
            TokenCacheKey = $"{MicrosoftAppId}-cache";
        }