On-premise Exchange Server, Graph API, Mail.ReadBasic `/me/mailFolders('SentItems')/messages/ returns Access is denied. Check credentials and try again. REST APIs for this mailbox are currently in preview.

mohamed arshad 31 Reputation points
2022-06-29T12:31:51.257+00:00

Hi Team,

  1. Query : https://graph.microsoft.com/v1.0/me/mailFolders('SentItems')/messages
  2. Scopes : openid profile User.Read email Mail.ReadBasic Contacts.Read
  3. server : On-premise Exchange server
  4. Response : {
    "statusCode": 403,
    "body": {
    "error": {
    "code": "ErrorAccessDenied",
    "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/.",
    }
    },

But the Issue

  1. is This same Above API Responds Fine for Another User In the Same On-Premise Exchange Server with Mail.Read Scope
  2. The same Above API Responds Fine for Users with Personal Microsoft Account like ( x@harsh.com .com or x@Stuff .com)

What I need to know is

  • Why this Error Occurs on users with Mail.ReadBasic and not the one with Mail.Read ?
  • If this Error is due to the Deprecation of on-premise servers then this should happen to the user with Mail.Read too right ?

Any Replies will be really helpfull and appreciated..
thanks,

Note:

  • I have read about the deprecation of Microsoft Graph for Hybrid deployments the next year LINK
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,829 questions
Exchange Server Development
Exchange Server Development
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Development: The process of researching, productizing, and refining new or existing technologies.
540 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Andy David - MVP 147.6K Reputation points MVP
    2022-06-29T13:18:50.137+00:00

    Well, those are two different permissions.
    https://learn.microsoft.com/en-us/graph/permissions-reference#mail-permissions
    My assumption is that eventually this will fail for all once the March 2023 date hits.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.