Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Updating the get customer command (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaiah Williams authored Nov 22, 2019
1 parent fe1ce1f commit 0aaa8b6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/PowerShell/Commands/GetPartnerCustomer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace Microsoft.Store.PartnerCenter.PowerShell.Commands
using Enumerators;
using Models.Authentication;
using Models.Customers;
using Network;
using PartnerCenter.Models;
using PartnerCenter.Models.Customers;
using PartnerCenter.Models.Query;
Expand Down Expand Up @@ -56,7 +57,9 @@ public override void ExecuteCmdlet()
}
if (ParameterSetName.Equals("ByDomain", StringComparison.InvariantCultureIgnoreCase))
{
Graph.IGraphServiceClient client = PartnerSession.Instance.ClientFactory.CreateGraphServiceClient();
Graph.GraphServiceClient client = PartnerSession.Instance.ClientFactory.CreateGraphServiceClient() as Graph.GraphServiceClient;
client.AuthenticationProvider = new GraphAuthenticationProvider();

Graph.IGraphServiceContractsCollectionPage data = client.Contracts.Request().Filter($"defaultDomainName eq '{Domain}'").GetAsync().ConfigureAwait(false).GetAwaiter().GetResult();

if (data.CurrentPage != null && data.CurrentPage.Any())
Expand Down

0 comments on commit 0aaa8b6

Please sign in to comment.