Azure / Azure/azure-rest-api-specs

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

Open
#42,511 0 comments 0 reactions 0 assignees View on GitHub
API Management bug customer-reported question Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

### 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

Contributor guide

Open the contributing guide

Research direction

Start in the specification/apimanagement directory linked in the issue and inspect the 2021-08-01 definition for credentials/v2/systemassigned. Compare its path, availability, and response with the reported REST call and 404 behavior. Done means the specification and the observed endpoint behavior are reconciled, with the issue clearly identified as a specification or service problem.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, openapi
Domain
api, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.