We deploy an azure web app and then create its webapp target in octopus. this was working fine and neither were any changes made to our azure account in octopus. it has suddenly started giving this error. please help.
Error running AzureWebAppCreateTargetServiceMessageHandler for create-azurewebapptarget: create-azurewebapptarget is invalid. Account xxxx is not available for this tenant.
Octopus.Server.Orchestration.ServerTasks.Deploy.ActionDispatch.ServiceMessageHandlers.ServiceMessageHandlerHelpers.ActionNotValid(String actionName, IEnumerable`1 errorMessages) in C:\buildAgent\work\7881e50627116cb\source\Octopus.Server\Orchestration\ServerTasks\Deploy\ActionDispatch\ServiceMessageHandlers\ServiceMessageHandlerHelpers.cs:line 22
Thanks for reaching out. Sorry to hear about the issue with your azure account. I believe this issue is already being worked on, let me reach out to the engineers and see what the timeline for a fix to get pushed to cloud is. As our engineers are in Australia, it may not be until later tonight or tomorrow morning that we get a response.
Please feel free to reach out in the meantime with any other questions or concerns.
Hi Jeremy
We were having this issue since July 14th. Has it been that long. Can you please provide details about the i created deployment targets manually using this account and it worked.
Thank you for your response.
Regards
Vinayak
We are having this problem since July 14th. Has it really been there for so long. I manually created deployment target using the same Azure account and it worked.
Please provide more details on the issue being worked on .
There was a regression and they are still working on the issue as far as I’m aware, but I can get more information to you after I hear from engineering later tonight.
Can you please elaborate on the manually creating deployment targets portion?
Another potential workaround you could test:
If you create a second Azure account and set it to untenanted with the same credentials and switch to that account in the steps giving you the error, it should go away.
Please let me know if that workaround works for you.
Current account is set to Include in both tenanted and untenanted deployments
Should i set it to Exclude from tenanted deployments and remove all the associated tenants ?
Manually creating deployment target was just to let you know that its working with the account and that the powershell method new-azurewebapptarget is failing when executed through script.
This workaround is assuming that you are facing the same issue as our other users, where you are trying to deploy untenanted but getting a tenant error.
I wouldn’t modify your existing account unless that’s easier for you. Creating a second identical Azure account with existing settings to be used as a workaround until the fix is in place may be easier. That’s up to you which you prefer. I would definitely create a new one just as a test to make sure it’s also working for you before you do any modifications.
The workaround is to create a new azure account (with the same credentials as the old one) in Octopus, then set this one as untenanted, as shown in the screenshot here:
Sorry I misunderstood what you were deploying to. I thought you were deploying to untenanted targets. Until the fix is in place you will need an Azure account set to Tenanted only with the required tenants attached, and an Azure account set to exclude from tenants, and use those tow accounts respectively for if you are deploying to tenants or not.
Can you try Modifying/creating an account to have tenanted only with the required tenants and try that instead?
Also will i need to create a new release for these values to apply ? Or can i re-run the existing release and it will pick up the new azure account value ?
Change it to Include only in tenanted deployments, then select the appropriate tenants+tags that you will be deploying to in the new field(Associated Tenants). This should allow you to use your azure account in tenanted deployments. You will use this one when deploying to tenants (by changing the variable Tenant.Azure.Account within that project to be this account,) and the other account we set up earlier when deploying to targets that aren’t tenants.
You will need to create a new release as the variables (and by extension, the azure account), will be frozen in time of the snapshot that was created when you created the release.
Sorry, this is a little bit confusing for a workaround. Please let me know if that didn’t make sense.
If you can get it implemented please let me know if the workaround gets you unstuck.
If the variable is within the project itself I don’t think you should need to, but if you want to specify different accounts on a per tenant basis for some reason, you could do it here.
Lets say your Project was originally configured to use AzureAccountA. You should just need to go to the variables where AzureAccountA was referenced to be used within the project and change it to AzureAccountC(tenanted only azure account). This is assuming your project does not have both Tenanted and Untenanted deployments. If it does, you will need to set the azure account within that tenant variable.
If that doesn’t answer your question please let me know and we can try to set up a quick call.