MS Graph Exchange with shared mailbox correlation

Domagoj Grguric 100 Reputation points
2023-10-31T15:39:33.9866667+00:00

We are working on an app which fetches all the messages for a particular user in their Mailbox using the MS Graph endpoint.

The mailbox is defined as a user mailbox. When disabling the Exchange license for this user, the endpoint no longer returns a valid response, instead it returns 404 error code, describing that the mailbox is inactive, which is expected behavior.

The interesting part begins when I switch this user's mailbox to a shared mailbox:Screenshot from 2023-10-31 12-56-45

After I changes the mailbox for "user1" to a SharedMailbox I disabled the Exchange license:

Screenshot from 2023-10-31 13-15-14

The fetch getLiceseDetails endpoint returns for this user that the License is disabled:

Screenshot from 2023-10-31 13-11-03

Now when I try fetching the messages for this user I am getting a good result back with status 200:

User's image

How is this possible? The license is disabled and I am able to get back results for this user, but previously when the Mailbox was a UserMailbox type when I disabled the license I got status 404 back.

A few questions that I would kindly ask you to clarify for me please:

  • What is the effect of converting a user mailbox to a SharedMailbox in respect to MS Graph endpoint to fetch user messages?
  • Why does the license being disabled have no effect on a SharedMailbox and the messages endpoint returns data with status code 200 (even if I remove the whole license package I still get back messages)?
  • Since the above bulletpoint works for SharedMailbox, why is for accessing UserMailbox a license required with MS Graph
  • Is it possible for the users to log into their Outlook mail when having a shared mailbox and no licenses attached? According to a few posts online it is possible, user can access its sharedMailbox through outlook without having any licenses active, but I was not able to get this to work, I would receive a status 500 and Microsoft.Exchange.Clients.Owa2.Server.Core.OwaUserHasNoMailboxAndNoLicensesAssignedException. Could you point me to some documentation how to make it possible for the user to sign into his Outlook sharedMailbox type without having any licenses attached?
Microsoft Exchange Online
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,446 questions
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,386 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jarvis Sun-MSFT 10,186 Reputation points Microsoft Vendor
    2023-11-01T02:04:03.7233333+00:00

    Hi @Domagoj Grguric ,

    Welcome to our Q&A forum!

    Regarding your questions, here are some of my insights:

    1.What is the effect of converting a user mailbox to a SharedMailbox in respect to MS Graph endpoint to fetch user messages?

    When you convert a user mailbox to a shared mailbox, all of the existing email and calendar information is retained. Only now it’s in a shared mailbox where several people will be able to access it instead of one person.

    2.Why does the license being disabled have no effect on a SharedMailbox and the messages endpoint returns data with status code 200 (even if I remove the whole license package I still get back messages)?

    A user mailbox needs a license assigned to it before you convert it to a shared mailbox. Otherwise, you won’t see the option to convert the mailbox. If you’ve removed the license, add it back so you can convert the mailbox. After converting the user mailbox to a shared mailbox, you can remove the license from the user’s account. Without a license, shared mailboxes are limited to 50 GB. You might need to delete a bunch of large messages (say, messages with attachments) from the shared mailbox to shrink it down so you can remove the license.

    3.Since the above bulletpoint works for SharedMailbox, why is for accessing UserMailbox a license required with MS Graph

    Shared mailboxes do not require licenses and can be accessed by users who do not have licenses assigned to them. However, for accessing UserMailbox, a license is required with MS Graph.

    4.Is it possible for the users to log into their Outlook mail when having a shared mailbox and no licenses attached?

    It is possible for users to log into their Outlook mail when having a shared mailbox and no licenses attached. However, there are some prerequisites that need to be met before this can be achieved. Firstly, ensure that the user has been granted full access permissions to the shared mailbox. Secondly, ensure that the user has been granted Send As permissions to the shared mailbox. Finally, ensure that there is no policy in place that prevents users from accessing shared mailboxes without licenses.

    Reference:

    https://learn.microsoft.com/en-us/microsoft-365/admin/email/convert-user-mailbox-to-shared-mailbox?view=o365-worldwide

    https://learn.microsoft.com/en-us/answers/questions/1294219/convert-to-shared-mailbox


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

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful