Skip to content

Commit

Permalink
Add custom request-config
Browse files Browse the repository at this point in the history
  • Loading branch information
bennerv committed Nov 8, 2023
1 parent c9124c4 commit beeac21
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/util/cluster/aad.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,17 @@ import (
msgraph_apps "github.com/Azure/ARO-RP/pkg/util/graph/graphsdk/applications"
msgraph_models "github.com/Azure/ARO-RP/pkg/util/graph/graphsdk/models"
msgraph_errors "github.com/Azure/ARO-RP/pkg/util/graph/graphsdk/models/odataerrors"
abstractions "github.com/microsoft/kiota-abstractions-go"
)

func (c *Cluster) createApplication(ctx context.Context, displayName string) (string, string, error) {
appBody := msgraph_models.NewApplication()
appBody.SetDisplayName(&displayName)
appResult, err := c.spGraphClient.Applications().Post(ctx, appBody, nil)
requestConfig := &msgraph_apps.ApplicationsRequestBuilderPostRequestConfiguration{
Headers: abstractions.NewRequestHeaders(),
}
requestConfig.Headers.Add("Accept-Encoding", "Identity")
appResult, err := c.spGraphClient.Applications().Post(ctx, appBody, requestConfig)
if err != nil {
return "", "", err
}
Expand Down

0 comments on commit beeac21

Please sign in to comment.