This commit is contained in:
Daniel Xiao 2024-09-08 22:48:18 -05:00
Родитель 0aff5fa7f4
Коммит 8ac94781b7
2 изменённых файлов: 8 добавлений и 4 удалений

Просмотреть файл

@ -23,12 +23,14 @@ namespace Microsoft.PowerBI.Common.Authentication
IEnumerable<string> scopes = new[] { $"{environment.AzureADResource}/.default" };
if (this.AuthApplication == null)
{
BrokerOptions options = new BrokerOptions(BrokerOptions.OperatingSystems.Windows);
options.Title = "My Awesome Application";
this.AuthApplication = PublicClientApplicationBuilder
.Create(environment.AzureADClientId)
.WithAuthority(environment.AzureADAuthority)
.WithLogging((level, message, containsPii) => LoggingUtils.LogMsal(level, message, containsPii, logger))
.WithRedirectUri(environment.AzureADRedirectAddress)
.WithBroker(new BrokerOptions(BrokerOptions.OperatingSystems.Windows))
.WithBroker(options)
.Build();
}

Просмотреть файл

@ -114,13 +114,15 @@ namespace Microsoft.PowerBI.Common.Authentication
// auth application is auto cleared when there's no account
if (this.AuthApplication == null)
{
BrokerOptions options = new BrokerOptions(BrokerOptions.OperatingSystems.Windows);
options.Title = "My Awesome Application";
var authApplicationBuilder = PublicClientApplicationBuilder
.Create(environment.AzureADClientId)
.WithAuthority(environment.AzureADAuthority)
.WithLogging((level, message, containsPii) => LoggingUtils.LogMsal(level, message, containsPii, logger))
.WithExtraQueryParameters(queryParameters)
.WithRedirectUri(environment.AzureADRedirectAddress)
.WithBroker(new BrokerOptions(BrokerOptions.OperatingSystems.Windows));
.WithBroker(options);
if (!PublicClientHelper.IsNetFramework)
{