From feef50960cc99686ddae5f4ea9c568a52bfc02d7 Mon Sep 17 00:00:00 2001 From: Tom Bamford Date: Tue, 21 Feb 2023 17:18:09 +0200 Subject: [PATCH] Fix client version --- internal/services/groups/client/client.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/services/groups/client/client.go b/internal/services/groups/client/client.go index c50ef31109..fb2f665fef 100644 --- a/internal/services/groups/client/client.go +++ b/internal/services/groups/client/client.go @@ -16,6 +16,9 @@ func NewClient(o *common.ClientOptions) *Client { administrativeUnitsClient := msgraph.NewAdministrativeUnitsClient(o.TenantID) o.ConfigureClient(&administrativeUnitsClient.BaseClient) + // SDK uses wrong endpoint for v1.0 API, see https://github.com/manicminer/hamilton/issues/222 + administrativeUnitsClient.BaseClient.ApiVersion = msgraph.VersionBeta + directoryObjectsClient := msgraph.NewDirectoryObjectsClient(o.TenantID) o.ConfigureClient(&directoryObjectsClient.BaseClient)