Skip to content

[BUG] APIM Credentials Manager API (credentials/v2/systemassigned) returns NotFound when enabling system-assigned identity #42511

@ankitp-optimus

Description

@ankitp-optimus

API Spec link

https://github.com/Azure/azure-rest-api-specs/tree/main/specification/apimanagement

API Spec version

2021-08-01

Describe the bug

Description

When enabling system-assigned managed identity on an Azure API Management (APIM) instance using the Microsoft.ApiManagement service's credentials/v2/systemassigned API endpoint, the API returns a 404 NotFound error.

The endpoint path being used is:

/subscriptions//resourceGroups//providers/Microsoft.ApiManagement/service//credentials/v2/systemassigned

This is expected to return the system-assigned managed identity credentials for the APIM instance, but instead returns NotFound.

Expected Behavior

The credentials/v2/systemassigned endpoint should return the system-assigned managed identity details when the managed identity is enabled on the APIM instance.

Actual Behavior

The API returns a 404 NotFound error when querying the credentials/v2/systemassigned endpoint.

Steps to Reproduce

  1. Create or configure an APIM instance in Azure
  2. Enable system-assigned managed identity on the APIM instance
  3. Call the credentials/v2/systemassigned endpoint via REST API
  4. Observe the 404 NotFound response

Environment

  • Azure API Management API version: 2021-08-01
  • Region: West Europe (and potentially other regions)
  • APIM SKU: Developer

Additional Context

This issue affects automation scenarios where infrastructure as code tools (like Terraform) attempt to configure or verify system-assigned managed identity on APIM instances. The same configuration works when applied via the Azure Portal, suggesting the underlying managed identity is being set up correctly, but the REST API endpoint is not functioning as expected.

Expected behavior

The credentials/v2/systemassigned endpoint should successfully return the system-assigned managed identity configuration (including the tenantId and principalId) for the APIM instance when it has system-assigned managed identity enabled.

Actual behavior

The API returns a 404 NotFound error instead of returning the managed identity configuration. The error response indicates that the credentials/v2/systemassigned endpoint could not be found, even though the APIM instance has system-assigned managed identity enabled.

Reproduction Steps

  1. Create an Azure API Management instance (any SKU, e.g., Developer)
  2. Enable system-assigned managed identity on the APIM instance via Azure Portal or Azure CLI
  3. Make a REST API call to the credentials/v2/systemassigned endpoint:
    GET https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.ApiManagement/service//credentials/v2/systemassigned?api-version=2021-08-01
  4. Observe the 404 NotFound response instead of the expected managed identity configuration

Environment

  • Azure API Management API version: 2021-08-01
  • Region: West Europe
  • APIM SKU: Developer
  • Infrastructure as Code tool: Terraform with azurerm provider

Metadata

Metadata

Assignees

No one assigned

    Labels

    API ManagementService AttentionWorkflow: This issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions