Skip to content

Commit

Permalink
Merge pull request kubernetes#87590 from weinong/fix-87586
Browse files Browse the repository at this point in the history
don't specify apiVersion when getting AAD token
  • Loading branch information
k8s-ci-robot authored Feb 13, 2020
2 parents 8ca96f3 + 6901346 commit d883045
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func GetServicePrincipalToken(config *AzureAuthConfig, env *azure.Environment) (
env.ServiceManagementEndpoint)
}

oauthConfig, err := adal.NewOAuthConfig(env.ActiveDirectoryEndpoint, tenantID)
oauthConfig, err := adal.NewOAuthConfigWithAPIVersion(env.ActiveDirectoryEndpoint, tenantID, nil)
if err != nil {
return nil, fmt.Errorf("creating the OAuth config: %v", err)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func TestGetServicePrincipalToken(t *testing.T) {
token, err := GetServicePrincipalToken(config, env)
assert.NoError(t, err)

oauthConfig, err := adal.NewOAuthConfig(env.ActiveDirectoryEndpoint, config.TenantID)
oauthConfig, err := adal.NewOAuthConfigWithAPIVersion(env.ActiveDirectoryEndpoint, config.TenantID, nil)
assert.NoError(t, err)

spt, err := adal.NewServicePrincipalToken(*oauthConfig, config.AADClientID, config.AADClientSecret, env.ServiceManagementEndpoint)
Expand Down

0 comments on commit d883045

Please sign in to comment.