Integrated Runtime The client with object id does not have authorization to perform action Microsoft.Authorization/roleAssignments/write over scope

Data factory add existing integrated runtime. Trying to create a shared self-hosted IR using Azure Data Factory UI. Grant permission to another Data factory or user-assigned managed identity. Documentation https://learn.microsoft.com/en-us/azure/data-factory/create-shared-self-hosted-integration-runtime-powershell

Integrated Runtime

Integrated Runtime Error

After granting permission to another Data factory you get the following message.

Error code
 AuthorizationFailed
The client * with object id * does not have authorization to perform action 'Microsoft.Authorization/roleAssignments/write' over scope '/subscriptions/*/resourcegroups/*/providers/Microsoft.DataFactory/factories/*/integrationRuntimes/*/providers/Microsoft.Authorization/roleAssignments/*' or the scope is invalid. If access was recently granted, please refresh your credentials.

Solution

This is a permission issue. Either you are not the owner or have enough permission to share the integrated runtime with another Data Factory. Either get more permission or login as the administrator to do it.