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 ae931c4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/util/cluster/aad.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import (
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{}
appResult, err := c.spGraphClient.Applications().Post(ctx, appBody, requestConfig)
if err != nil {
return "", "", err
}
Expand All @@ -35,7 +36,7 @@ func (c *Cluster) createApplication(ctx context.Context, displayName string) (st
// ByApplicationId is confusingly named, but it refers to
// the application's Object ID, not to the Application ID.
// https://learn.microsoft.com/en-us/graph/api/application-addpassword?view=graph-rest-1.0&tabs=http#http-request
pwResult, err := c.spGraphClient.Applications().ByApplicationId(id).AddPassword().Post(ctx, pwCredentialRequestBody, nil)
pwResult, err := c.spGraphClient.Applications().ByApplicationId(id).AddPassword().Post(ctx, pwCredentialRequestBody, (*msgraph_apps.ItemAddPasswordRequestBuilderPostRequestConfiguration)(requestConfig))
if err != nil {
return "", "", err
}
Expand Down

0 comments on commit ae931c4

Please sign in to comment.