From 567c0acdc86c0d31bcb436f3e1ae33e7b0619ed7 Mon Sep 17 00:00:00 2001 From: iwarapter Date: Wed, 22 Feb 2023 16:08:07 +0000 Subject: [PATCH] Allow ProvisionOnDemand to return OK as response --- msgraph/synchronization.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msgraph/synchronization.go b/msgraph/synchronization.go index f8611117..e3a27591 100644 --- a/msgraph/synchronization.go +++ b/msgraph/synchronization.go @@ -288,7 +288,7 @@ func (c *SynchronizationJobClient) ProvisionOnDemand(ctx context.Context, id str resp, status, _, err := c.BaseClient.Post(ctx, PostHttpRequestInput{ Body: body, - ValidStatusCodes: []int{http.StatusCreated}, + ValidStatusCodes: []int{http.StatusCreated, http.StatusOK}, Uri: Uri{ Entity: fmt.Sprintf("/servicePrincipals/%s/synchronization/jobs/%s/provisionOnDemand", servicePrincipalId, id), HasTenantId: true,