This might have different reasons, we’ll collect all possible problems here.
Approval required
Currently, an Microsoft 365 administrator will have to consent to using the app. You’ll get an error similar to the following if this has not been granted yet:
...
To fix this issue, please contact an administrator of your company. Here is a support article outlining the process: Approve Microsoft 365 access