Azure Graph API - Check if IUser is a room or resource
<p>I am using the <a href="https://www.nuget.org/packages/Microsoft.Azure.ActiveDirectory.GraphClient/" rel="nofollow">ActiveDirectory GraphClient</a> library by Microsoft to access an Azure AD.</p>

<p>In my <strong><em>IActiveDirectoryClient</em> object</strong> I can access all users by using the collection in <strong><em>Users</em> property</strong>.</p>

<p>By using the <strong><em>ExecuteAsync()</em> method</strong> I can load all users, rooms and recources.</p>

<pre><code>void async Task&lt;List&lt;IUser&gt;&gt; GetRooms(IActiveDirectoryClient client)
{
    var rooms = new List&lt;IUser&gt;();

    var pagedUsers = await client.Users.ExecuteAsync();
    while (pagedUsers != null &amp;&amp;
           pagedUsers.CurrentPage != null)
    {
        // enumerate IUser objects
        foreach (IUser u in pagedUsers.CurrentPage)
        {
            //TODO: HOW-TO CHECK IF ROOM
        }

        /* load next page */
    }

    return rooms;
}
</code></pre>

<p><strong>My problem is:</strong></p>

<p>I'd like to get to know from an <strong><em>IUser</em></strong> object if it is a room or resource but I do not know where to look.</p>