/// <summary>
        /// Constructor of a ConfidentialClientApplicationBuilder from application configuration options.
        /// See https://aka.ms/msal-net-application-configuration
        /// </summary>
        /// <param name="options">Confidential client applications configuration options</param>
        /// <returns>A <see cref="ConfidentialClientApplicationBuilder"/> from which to set more
        /// parameters, and to create a confidential client application instance</returns>
        public static ConfidentialClientApplicationBuilder CreateWithApplicationOptions(
            ConfidentialClientApplicationOptions options)
        {
            var config  = new ApplicationConfiguration();
            var builder = new ConfidentialClientApplicationBuilder(config).WithOptions(options);

            if (!string.IsNullOrWhiteSpace(options.ClientSecret))
            {
                builder = builder.WithClientSecret(options.ClientSecret);
            }
            return(builder);
        }
        [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]  // hide confidential client on mobile
#endif
        public static ConfidentialClientApplicationBuilder CreateWithApplicationOptions(
            ConfidentialClientApplicationOptions options)
        {
            ConfidentialClientApplication.GuardMobileFrameworks();

            var config  = new ApplicationConfiguration();
            var builder = new ConfidentialClientApplicationBuilder(config).WithOptions(options);

            if (!string.IsNullOrWhiteSpace(options.ClientSecret))
            {
                builder = builder.WithClientSecret(options.ClientSecret);
            }

            if (!string.IsNullOrWhiteSpace(options.AzureRegion))
            {
                builder = builder.WithAzureRegion(options.AzureRegion);
            }

            return(builder);
        }