question

sujanchristo avatar image
0 Votes"
sujanchristo asked ·

Azure Active Directory - Get Windows 10 Current Active Users

Hi Team,

We want to get the currently active Windows 10 Users using Graph SDK who are Azure AD Domain Joined to a Tenant.

What is the best API which can be used for it?

Please note that we are aware of Reports and AuditLogs:
getOffice365ActiveUserDetail
https://graph.microsoft.com/v1.0/auditLogs/signIns

We got the result for both of the above ones.

Could you please help me on this?

Thanks in advance,

WIth Warm Regards,
Sujan

azure-active-directory
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MarileeTurscak-MSFT avatar image
0 Votes"
MarileeTurscak-MSFT answered ·

Hi Sujan,

Please try passing the filter parameter into your request. Filter supports the property accountEnabled of the User entity, so you can use this property to find active user.

Here's the request you have to use:

GET https://graph.microsoft.com/v1.0/users?$filter=accountEnabled+eq+true

To get the other user information you'll need to retrieve the user details.

· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Marilee,

Thanks for your comments and sorry for the late reply!

BTW, the above will return all the users whose accounts are in enabled state. Am I right?

What we want is to show all the current active users who are Azure AD Joined and working now.

The need is to build an utility which will help us to identify all the active users in our organisation RIGHT NOW.

Hope I am clear enough and not going astray and expecting your thoughts!

Many thanks for the help,

WIth Warm Regards,
Sujan

0 Votes 0 ·