From 85edc6a885728f93c80f710eafeed4e13caf1dd3 Mon Sep 17 00:00:00 2001 From: Tom Bamford Date: Thu, 13 Apr 2023 22:58:30 +0100 Subject: [PATCH] Consistency retry for role assignments --- msgraph/role_assignments.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/msgraph/role_assignments.go b/msgraph/role_assignments.go index c33ccbe1..722feb79 100644 --- a/msgraph/role_assignments.go +++ b/msgraph/role_assignments.go @@ -88,8 +88,9 @@ func (c *RoleAssignmentsClient) Create(ctx context.Context, roleAssignment Unifi } resp, status, _, err := c.BaseClient.Post(ctx, PostHttpRequestInput{ - Body: body, - ValidStatusCodes: []int{http.StatusCreated}, + Body: body, + ConsistencyFailureFunc: RetryOn404ConsistencyFailureFunc, + ValidStatusCodes: []int{http.StatusCreated}, Uri: Uri{ Entity: "/roleManagement/directory/roleAssignments", },