Hello @Sinipelto,
welcome to this moderated Azure community forum.
The Azure portal has limited functionality, dedicated to the same subscription.
A managed identity is bound to EntraID so this is a challenge when combining multiple subscriptions.
Have you tried to use ARM/Bicep or the Azure CLI?
I checked the AZ CLI command for the IoT Hub endpoints and it seems a connection string should be sufficient:
Please try this together with the subscription ID and other settings.
If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.