When deploying a marketplace managed app offer into a customer subscription, you can create an identity in the managed resource group associated with the managed application. However, in order for that identity to have any permissions, it must be assigned a role.
When the publisher and customer are in the same tenant, the roleAssignment can be created as expected and the identity has permissions within the managed resource group.
However, when the customer is in a different tenant (and active directory), then I get the following error:
Principal not found in tenant '[PUBLISHER TENANT ID]'. If you are attempting to PUT this role assignment in tenant '[CUSTOMER TENANT ID]' then the delegatedManagedIdentityResourceId property must be specified
Looking into the mentioned delegatedManagedIdentityResourceId, it gets pretty hairy pretty quickly and I'm not sure that's the path I want to go down or if it would even get me where I need to be, which is to have an identity in the managed resource group which has permissions to do read/write operations within the managed resource group.
Thank you.




Managed Identity resource can access resource only in its own tenant. At present Managed Identity does not support cross tenant scenarios. Please refer to known issues in official Microsoft documentation.