I'm getting the error below when accessing data using Microsoft Graph API:
{"ServerInfo":{"DataCenter":"South XXX","Slice":"E","Ring":"2","ScaleUnit":"002","RoleInstance":"M*******70"}}
{
"error": {
"code": "BadRequest",
"message": "/me request is only valid with delegated authentication flow.",
"innerError": {
"date": "2024-03-14T02:17:32",
"request-id": "***********************",
"client-request-id": "***********************"
}
}
}
I am writing the Java client to access the user mailbox; IMAP plain authentication is blocked, hence trying with Microsoft Graph api.
Given the user.read mail. Read mail. Send permissions.