Microsoft.Solutions.ArmApiControl POST not Working

Lyubomir Achakaknov 0 Reputation points
2024-12-18T14:03:27.1933333+00:00

The below snippet stopped working. It is used in generating Template Spec UI definition. The "POST" method , stopped working and it is not returning any value , braking the Template Spec custom UI.

We there any recent changes?

{
              "name": "NameValidation",
              "type": "Microsoft.Solutions.ArmApiControl",
              "request": {
                "method": "POST",
                "path": "[concat(steps('basics').resourceScope.subscription.id,'/providers/Microsoft.Storage/checkNameAvailability?api-version=2023-05-01')]",
                "body": {
                  "name": "[steps('basics').name]",
                  "type": "Microsoft.Storage/storageAccounts"
                }
              }
            },
Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,239 questions
Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,294 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Hari Babu Vattepally 1,195 Reputation points Microsoft Vendor
    2024-12-18T18:41:12.0433333+00:00

    Hi @Lyubomir Achakaknov

    Welcome to Microsoft Q&A Forum. Thanks for posting your query here!

    From the above provided information, we see that there could be an issue with POST method not working in your Azure Template Spec UI definition.

    Please try and check the below suggestions to troubleshoot the issue:

    • Check if there have been any recent changes to the API version you are using (2023-05-01).
    • Ensure that the request format is correct. The body of the request should match the expected schema for the checkNameAvailability endpoint. Double-check the required fields and their types. Ensure that the value for name is being correctly passed from your template
    • Also, make sure to check the authentication token which is being used should have the necessary permissions to call the checkNameAvailability API. If there are any recent changes to the permissions or roles assigned to the service principal or user, it may also cause the due to Authorization failures. This generally requires at least Reader role to access to the subscription.
    • Please implement error handling in your code to capture any error messages returned by the API. This can provide insights into what might be going wrong.
    • If there are any recent changes made in API version or endpoint has changed, update your template accordingly.

    Hope the above suggestions helps in resolving the issue. Please do let us know if the issue is resolved or still persists, we will be glad to assist you closely.

    Please do consider to Upvote wherever the information provided helps you, this can be beneficial to other community members.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.