public IntuneServiceLocationProvider()

in src/CsrValidation/csharp/ScepValidation/IntuneServiceLocationProvider.cs [92:156]


        public IntuneServiceLocationProvider(Dictionary<string,string> configProperties, MsalClient msalClient, AdalClient adalClient, IHttpClient httpClient = null, TraceSource trace = null)
        {
            // Required Parameters
            if (configProperties == null)
            {
                throw new ArgumentNullException(nameof(configProperties));
            }

            configProperties.TryGetValue("TENANT", out tenant);
            if (string.IsNullOrWhiteSpace(tenant))
            {
                throw new ArgumentNullException(nameof(tenant));
            }

            if(msalClient == null)
            {
                throw new ArgumentNullException(nameof(msalClient));
            }
            this.msalClient = msalClient;

            if (adalClient == null)
            {
                throw new ArgumentNullException(nameof(msalClient));
            }
            this.adalClient = adalClient;

            // Optional Parameters
            if (trace != null)
            {
                this.trace = trace;
            }

            configProperties.TryGetValue("AAD_GRAPH_API_VERSION", out aadGraphApiVersion);
            if (string.IsNullOrWhiteSpace(aadGraphApiVersion))
            {
                aadGraphApiVersion = DEFAULT_AADGRAPH_VERSION;
            }

            configProperties.TryGetValue("MS_GRAPH_API_VERSION", out msGraphApiVersion);
            if (string.IsNullOrWhiteSpace(msGraphApiVersion))
            {
                msGraphApiVersion = DEFAULT_MSGRAPH_VERSION;
            }

            configProperties.TryGetValue("AAD_GRAPH_RESOURCE_URL", out aadGraphResourceUrl);
            if (string.IsNullOrWhiteSpace(aadGraphResourceUrl))
            {
                aadGraphResourceUrl = DEFAULT_AADGRAPH_RESOURCE_URL;
            }

            configProperties.TryGetValue("MSAL_GRAPH_RESOURCE_URL", out msalGraphResourceUrl);
            if (string.IsNullOrWhiteSpace(msalGraphResourceUrl))
            {
                msalGraphResourceUrl = DEFAULT_MSGRAPH_RESOURCE_URL;
            }

            configProperties.TryGetValue("INTUNE_APP_ID", out intuneAppId);
            if (string.IsNullOrWhiteSpace(intuneAppId))
            {
                intuneAppId = DEFAULT_INTUNE_APP_ID;
            }

            // Dependencies
            this.httpClient = httpClient ?? new HttpClient(new System.Net.Http.HttpClient());
        }