Skip to content

Commit

Permalink
Update AADEntityProviderConfig.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Yvand committed Aug 16, 2023
1 parent 25c87c7 commit ce98609
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public interface IAADSettings : IEntityProviderSettings

public class AADEntityProviderSettings : EntityProviderSettings, IAADSettings
{
public List<AzureTenant> AzureTenants { get; set; }
public List<AzureTenant> AzureTenants { get; set; } = new List<AzureTenant>();

public string ProxyAddress { get; set; }

Expand Down Expand Up @@ -117,11 +117,13 @@ public override bool InitializeDefaultSettings()
protected override bool InitializeInternalRuntimeSettings()
{
bool success = base.InitializeInternalRuntimeSettings();
foreach (var tenant in this.AzureTenants)
if (this.AzureTenants != null)
{
tenant.InitializeAuthentication(this.Timeout, this.ProxyAddress);
foreach (var tenant in this.AzureTenants)
{
tenant.InitializeAuthentication(this.Timeout, this.ProxyAddress);
}
}

return success;
}

Expand Down

0 comments on commit ce98609

Please sign in to comment.