Create Automation Account gives 'Bad Request'

Thor Baunsgaard 10 Reputation points
2024-01-24T15:38:23.8566667+00:00

getting 'Bad request' when attempting to create an Automation Account, anyone has an idea why? Thanks!

{

    "authorization": {
        "action": "Microsoft.Automation/automationAccounts/write",
#         "scope": "/subscriptions/--REDACTED--/resourcegroups/rg1/providers/Microsoft.Automation/automationAccounts/AutomationAccount1"
    },
    "caller": "tbcon",
    "channels": "Operation",
    "correlationId": "c8d4fab8-6e24-440f-b4cb-7c67ab5cd0be",
    "description": "",
    "eventDataId": "b2fb30f4-0240-4166-8be4-fcd8c14015d4",
    "eventName": {
        "value": "EndRequest",
        "localizedValue": "End request"
    },
    "category": {
        "value": "Administrative",
        "localizedValue": "Administrative"
    },
    "eventTimestamp": "2024-01-24T15:20:09.308457Z",
    "id": "/subscriptions/--REDACTED--/resourcegroups/rg1/providers/Microsoft.Automation/automationAccounts/AutomationAccount1/events/b2fb30f4-0240-4166-8be4-fcd8c14015d4/ticks/638417064093084570",
    "level": "Error",
    "operationId": "b7f3e97f-84c8-44a3-8f15-cff4c3560652",
    "operationName": {
        "value": "Microsoft.Automation/automationAccounts/write",
        "localizedValue": "Create or Update an Azure Automation account"
    },
    "resourceGroupName": "rg1",
    "resourceProviderName": {
        "value": "Microsoft.Automation",
        "localizedValue": "Microsoft.Automation"
    },
    "resourceType": {
        "value": "Microsoft.Automation/automationAccounts",
        "localizedValue": "Microsoft.Automation/automationAccounts"
    },
    "resourceId": "/subscriptions/--REDACTED--/resourcegroups/rg1/providers/Microsoft.Automation/automationAccounts/AutomationAccount1",
    "status": {
        "value": "Failed",
        "localizedValue": "Failed"
    },
    "subStatus": {
        "value": "BadRequest",
        "localizedValue": "Bad Request (HTTP Status Code: 400)"
    },
    "submissionTimestamp": "2024-01-24T15:22:06Z",
    "subscriptionId": "--REDACTED--",
    "tenantId": "--REDACTED--",
    "properties": {
        "statusCode": "BadRequest",
        "serviceRequestId": null,
        "statusMessage": "{\"code\":\"BadRequest\",\"message\":\"{\\\"Message\\\":\\\"Something went wrong. Please contact support.\\\"}\"}",
        "eventCategory": "Administrative",
        "entity": "/subscriptions/--REDACTED--/resourcegroups/rg1/providers/Microsoft.Automation/automationAccounts/AutomationAccount1",
        "message": "Microsoft.Automation/automationAccounts/write",
        "hierarchy": "--REDACTED--/ManagementGroup1/--REDACTED--"
    },
    "relatedEvents": []
}
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,120 questions
{count} vote

3 answers

Sort by: Most helpful
  1. Ryan Hill 25,821 Reputation points Microsoft Employee
    2024-01-24T21:47:43.32+00:00

    Hi @Thor Baunsgaard

    It's difficult to say for certain since the error message is so vague. I suggest using the CLI to create the automation account. The CLI should give more helpful information if there is an underlying problem. To create the automation account:

    az automation account create --automation-account-name AutomationAccount1 --resource-group rg1 --sku Free --debug
    

    If you're able to successfully create the automation account, then it could be a portal issue. If the above command fails, then it indicates something else is going on. Regardless, please comment down below with the outcome so we can best know how to proceed.


  2. Ryan Hill 25,821 Reputation points Microsoft Employee
    2024-02-07T02:22:24.7366667+00:00

    Hi @Thor Baunsgaard and others

    This issue has been identified and the team is working to mitigate the fix, tentatively by February 20th.

    Apologies for the inconvenience this has caused.


  3. Andrew Adams 0 Reputation points
    2024-02-26T21:30:27.85+00:00

    Fixed for me. I can now create an Azure Automation Account in my free trial subscription. Of course, the free trial's over and I spent it waiting for this bug to be fixed. but that's how they do ya.

    0 comments No comments