Entering this information will route you directly to the right team and expedite traction.
Question, Bug, or Feature?
Type: Bug
Enter Task Name: HelmDeploy
An Azure AD enabled RBAC AKS cluster requires using the clusterAdmin credentials, otherwise an interactive login prompt is presented. Using the Helm Deploy task the clusterUser credentials are used, which blocks the deploy.
Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting
2019-04-02T21:13:13.7024378Z To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code BJWLC87XB to authenticate.
2019-04-02T21:13:13.7025969Z E0402 21:13:13.699661 3564 azure.go:126] Failed to acquire a token: acquiring a new fresh token: waiting for device code authentication to complete: autorest/adal/devicetoken: Error while retrieving OAuth token: Code Expired
azure-pipelines-tasks/Tasks/HelmDeployV0/src/clusters/armkubernetescluster.ts has the following which defaults to using the clusterUser:
var clusterInfo : AKSClusterAccessProfile = await aks.getAccessProfile(resourceGroup, clusterName);
The kubectl task allows this to be overridden, but this option is not available on the helm deploy task.
We get the clusteruser creds in the task which is why you are hitting this issue. Could you try creating a kubernetes service connection using azure subscription option? Steps
Add a Kubernetes Service connection using Azure subscription type (click on +New button)

Choose that connection in the Kubernetes service connection
Let me know if this unblocks you or not!
Hi, Any solution for this problem?
@Sudharma Have you tried using the solution that @Anumita mentioned?
well, all our deployments are automated with terraform and CI/CD, this particular option is just a work around AFAIK. However we are managing with the cluster admin role but would like to see how the cli would authenticate with the given Azure AD user.( This user could be a technical user for CI/CD and with proper Azure AD setup)
Hi,
are there any news to this issue?
We have the same problem here in our automated deployment where we setup an AKS (AAD enabled) with application gateway and ingress controller.
In the kubernetes deployment task , there is an option "Use cluster admin credentials" for the service connection type "Azure Resource Manager" which we miss in the "Package and deploy Helm charts" task for the same connection type.
I second that. Having the same authentication options as with the Kubernetes tasks is absolutely necessary. AAD enabled clusters look promising, but existing build definitions stopped working after using AAD features.
Especially with fully automated cluster deployments the described workaround is not handy since we do not have a configured kubernetes service connection at the time of cluster creation.
Thanks for an update!
Thanks @marc-mueller and @knoxi
We are picking this up.
Done

Closing the issue. Let me know if you have any feedback.
Most helpful comment
Hi,
are there any news to this issue?
We have the same problem here in our automated deployment where we setup an AKS (AAD enabled) with application gateway and ingress controller.
In the kubernetes deployment task , there is an option "Use cluster admin credentials" for the service connection type "Azure Resource Manager" which we miss in the "Package and deploy Helm charts" task for the same connection type.