I am writing Python code that is attempting to use a user managed identity. The id is correctly formatted (I think) but I keep getting the same error no matter what I do to the string.
This is the error:
Code: LinkedInvalidPropertyId
Message: Property id 'AZURE_MANAGED_IDENTITY_ID' at path '' is invalid. Expect fully qualified resource Id that start with '/subscriptions/{subscriptionId}' or '/providers/{resourceProviderNamespace}/'.
The line for creating the id looks like this:
managed_identity_resource = f"/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/{RESOURCE_GROUP}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{MANAGED_IDENTITY_NAME}"
Where the variables are loaded from a .env file. The variables are loading properly so that's not the problem.
The string that is created is perfect. So I don't understand why I am getting this error.
Thanks