Email account with Email Provider as Microsoft Office 365, and send using Microsoft Graph , Getting ErrorInvalidUser

Hi ,

I have configured Email account with Email Provider as Microsoft Office 365, and send using Microsoft Graph . Getting the below error while testing ..

Created DefaultExecutors
Starting to send request, URL https://graph.microsoft.com/v1.0/users/[email protected]/mailFolders
Request Method GET
Response code 404, Not Found
Handling error response
Deserializing type GraphErrorResponse
Graph service exception Error code: ErrorInvalidUser
Error message: The requested user ‘[email protected]’ is invalid.

GET https://graph.microsoft.com/v1.0/users/[email protected]/mailFolders
SdkVersion : graph-java-v1.4.0
Authorization : Bearer eyJ0eXAiOiJKV1QiLCJub25jZSI[…]

The same is working fine with microsoft graph explorer

Hi Team ,

Does any one faced the same issue and got it fixed ? if so please help us in resolving this issue

While creating the application in AZURE AD i selected the option as accessible across all the organizations(or multitenant)

we need to select the option as single tenant . after creating the new application as single tenant . iam able to access.