Forum Discussion

Ammar Hasayen's avatar
Ammar Hasayen
Iron Contributor
Jul 16, 2017

Microsoft Graph to query whether a user is office mailbox or not

Hi, we are developing an application on premises using .NET. We have mailboxes on premises and mailboxes on Office365, and Azure AD Sync is in place.

 

From within the .net app, we want to query the Microsoft Graph, and ask a simple question: Give this SPN for the user, does he have mailbox in Office 365 or not.

 

How can we achieve this using the Microsoft graph?

  • Amo Zhang's avatar
    Amo Zhang
    Copper Contributor

    How about this? Check the assignedLicenses property of the user object. If an Exchange Onine license assigned, you can assume that there is a mailbox for the user.

Resources