You can restrict non Admin users from the portal as a secondary resort. But this wont give you the fine-grained control. Just for admins. See:
- Sign -in to your Azure AD Admin Center.
Select Users –> User Settings
- Move the toggle to ‘Yes’ under the "Restrict access to Microsoft Entra admin center"
- Select ‘Save’ in the top.
I will generally recommend you use least privileged roles for your users in RBAC. e.g Remove any broader roles like "Reader" at the subscription or resource group level.
Also see https://learn.microsoft.com/en-us/schooldatasync/blocking-powershell-for-edu#block-powershell-for-everyone-except-a-list-of-admins to restrict powershell access
You can mark it 'Accept Answer' and 'Upvote' if this helped you
Regards,
Abiola