Filtering out `MailboxNotEnabledForRESTAPI`

Brent Arias 31 Reputation points
2021-11-15T17:42:24.6+00:00

I often receive a "mailbox not enabled" MailboxNotEnabledForRESTAPI because many users have not made their first/initial login attempt.

What filter can I apply when selecting users...to exclude all users who have not yet initialized their Exchange Online mailbox?

I see an AccountEnabled property I could filter on, except this property is read/write...which tells me it is not really what I'm looking for.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,845 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AtulThorat-MSFT 391 Reputation points
    2022-02-11T19:11:45.107+00:00

    Hi @Brent Arias ,

    Yes. we often receive a "mailbox not enabled" MailboxNotEnabledForRESTAPI because many users have not made their first/initial login attempt.

    Please refer below Microsoft article to get more details on this case.

    rest-api-is-not-yet-supported-for-this-mailbox-error

    Please refer below Microsoft article to get all details of "user resource type"

    user

    So accountEnabled property is of "Boolean" type and if it is true then account is enabled; otherwise, if false then account is disabled. This property is required when a user is created. It Returned only on $select and it supports $filter(eq, ne, not, and in).

    Hope this helps.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments

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.