Azure account credentials shadowed by SSH target account

I’m trying to run a script using the Azure Powershell step template on behalf of an SSH deploy target. Running the following script:

produces this output:
image

When run on behalf of a listening tentacle target though, I see my expected context credentials.

Hi Nathan,

Thanks for getting in touch.

Unfortunately you’ve discovered a bug in our execution logic. When you select a role to run on behalf of, and that maps to a target that has an account (in this case an SSH target, which has different account details to the Azure account details on the step), things get confused and we end up executing incorrectly. In this case the call to Get-AzureRmContext does not actually have context about your Azure subscription, so it’s failing.

We have created a GitHub issue here that you can track to be notified when a fix is available.

For the time being, you won’t be able to run on behalf of roles that map to an SSH target (or any target that includes account details).

Sorry for the bad news.

Cheers
Mark