diff --git a/src/Common/Common.Authentication/DeviceCodeAuthenticationFactory.cs b/src/Common/Common.Authentication/DeviceCodeAuthenticationFactory.cs index cd038cc..26be2d1 100644 --- a/src/Common/Common.Authentication/DeviceCodeAuthenticationFactory.cs +++ b/src/Common/Common.Authentication/DeviceCodeAuthenticationFactory.cs @@ -23,12 +23,14 @@ namespace Microsoft.PowerBI.Common.Authentication IEnumerable 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(); } diff --git a/src/Common/Common.Authentication/WindowsAuthenticationFactory.cs b/src/Common/Common.Authentication/WindowsAuthenticationFactory.cs index b99e946..dc85670 100644 --- a/src/Common/Common.Authentication/WindowsAuthenticationFactory.cs +++ b/src/Common/Common.Authentication/WindowsAuthenticationFactory.cs @@ -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) {