Which of the following errors are you getting?
You need to log in as M365 Admin. You’re likely not logged in with an account that can grant administrative consent.