Data Collection Rule (DCR) association with Virtual Machine Scale Set (VMSS) in Flexible orchestration mode fails due to two distinct issues related to Managed Identity handling and Private Link configuration.
Issue 1: DCR forces System-Assigned Managed Identity on VMSS Flexible
Problem Description
When associating a Data Collection Rule with a VMSS in Flexible orchestration mode, the DCR association process attempts to enable System-Assigned Managed Identity on the VMSS. However, VMSS Flexible only supports User-Assigned Managed Identity.
Expected Behavior
DCR association should detect the VMSS orchestration mode and use the existing User-Assigned Managed Identity instead of attempting to enable System-Assigned MI.
Actual Behavior
The operation fails with the following error:
HTTP Status Code: 400 Bad Request
{
"error": {
"code": "InvalidParameter",
"target": "identity",
"message": "The value 'SystemAssigned' of parameter 'identity' is not allowed. Allowed values are: UserAssigned, None."
}
}
Comparison with VMSS Uniform
| VMSS Mode |
System-Assigned MI |
User-Assigned MI |
DCR Association |
| Uniform |
Supported |
Supported |
Works |
| -------- |
-------- |
-------- |
-------- |
| Uniform |
Supported |
Supported |
Works |
| Flexible |
Not Supported |
Supported |
Fails |
Issue 2: Azure Monitor Agent fails to retrieve configuration via Private Link
Problem Description
After manually assigning a User-Assigned Managed Identity to the VMSS Flexible and installing the AzureMonitorLinuxAgent extension, the agent installs successfully but fails to retrieve DCR configuration.
Error from Agent Log:
Response Code: 403
Response: {
"error": {
"code": "InvalidAccess",
"message": "Data collection endpoint must be used to access configuration over private link."
}
}
Current RBAC Configuration for User-Assigned MI
The User-Assigned Managed Identity has the following role assignments:
| Role Resource Type |
Resource Type |
| Log Analytics Contributor |
Log Analytics Workspace |
| Monitoring Metrics Publisher |
Data Collection Rule |
Expected Behavior
The Azure Monitor Agent should use the User-Assigned MI credentials to authenticate and retrieve DCR configuration, then start sending logs to the Log Analytics Workspace.
Actual Behavior
- Agent extension installs successfully
- Agent fails to authenticate/retrieve configuration
- No logs are being sent to Log Analytics Workspace
- Is VMSS Flexible orchestration mode officially supported with Data Collection Rules?
- How should DCR association work with VMSS Flexible that only supports User-Assigned MI?
- Is there a workaround to specify User-Assigned MI during DCR association?
- Can DCR be configured to use existing User-Assigned MI instead of forcing System-Assigned MI?
- Private Link error:
- Is a Data Collection Endpoint (DCE) required for VMSS Flexible even without Private Link?
- What additional RBAC permissions are required on the DCE for User-Assigned MI?
- Should the DCE be explicitly configured in the agent extension settings?
- What is the recommended configuration for DCR + VMSS Flexible + User-Assigned MI + Private Link environment?