While clicking on the Grant permissions
it should automatically take the User objectId who has logged in to the portal and check the permissions for the user if the user has Global administrator
/ Directory Reader role(Preview)
in the Tenant Or Subscription and finally will perform the operation.
But as you have created a new AD tenant and added it to the subscription it sometimes fails to sync (tenant and subscription) and as per the error Invalid object Identifier null
it fails to get the user details .
So, the Issue can be fixed by logging in to the portal from a private window of the browser or signing out of the portal,then clearing the cache of the browser and relogging.