Merge pull request #87590 from weinong/fix-87586

don't specify apiVersion when getting AAD token
This commit is contained in:
Kubernetes Prow Robot 2020-02-13 05:16:35 -08:00 committed by GitHub
commit d88304507d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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)
}

View File

@ -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)