Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing resourceID when generating token with service principal #216

Open
stargriv opened this issue Feb 28, 2023 · 1 comment
Open

Missing resourceID when generating token with service principal #216

stargriv opened this issue Feb 28, 2023 · 1 comment

Comments

@stargriv
Copy link

Hello,

I'm trying to get an AAD token for AKS with: kubelogin get-token --use-azurerm-env-vars
And getting - Error: resourceID cannot be empty

I searched for the function, and it seems that the required parameter (resourceID) was not passed to the function.

case ServicePrincipalLogin:
return newServicePrincipalToken(*oAuthConfig, o.ClientID, o.ClientSecret, o.ClientCert, o.ClientCertPassword, o.ServerID, o.TenantID)

type servicePrincipalToken struct {
clientID string
clientSecret string
clientCert string
clientCertPassword string
resourceID string
tenantID string
oAuthConfig adal.OAuthConfig
}

func newServicePrincipalToken(oAuthConfig adal.OAuthConfig, clientID, clientSecret, clientCert, clientCertPassword, resourceID, tenantID string) (TokenProvider, error) {

@weinong
Copy link
Contributor

weinong commented Mar 4, 2023

i don't know why it wasn't added in the first place. do you know what env var is used in terraform for resourceID? besides, you can always add --server-id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants