This is most likely as a result of conditional access policies.
I will recommend you reach out to an admin on your tenant with the error. Or if you're the admin, please go to your sign-in logs and view the applied policy.
You can mark it 'Accept Answer' and 'Upvote' if this helped you
Regards,
Abiola