I have an Azure AD service principal in one tenant (OneTenant) that I would like to give access to an application in another tenant (OtherTenant).<
OneTenant
OtherTenant
Taking the command as is from your question:
New-AzureADServiceAppRoleAssignment ` -ObjectId ` -Id ` -PrincipalId ` -ResourceId
Try changing the last parameter value i.e. ResourceId
Currently you're passing
Replace that with