Message: Access is denied. Check credentials and try again. REST APIs for this mailbox are currently in preview. You can find more information about the preview REST APIs at https://dev.outlook.com/.
The following error might appear if a hybrid environment is used. You can check more info about it via the link:
I.e. mixed Microsoft Azure with Active Domain on-premise. Therefore, these accounts don't exist on Azure but exist on the Exchange server on-premise. As MS Graph is working only with Azure users, it is not possible to authenticate with users on-premise AD.
As an alternative, we recommend setting up IMAP OAuth 2.0 in such cases or switching to O365 instead of a hybrid environment