0
votes

I'm trying to figure out if there is a way to detect when a user launches one of the Office apps (Word, Excel, PowerPoint, OneNote, OneDrive, etc) so that I can add logic to perform some tasks if it's the first time the user has launched that particular Office app.

I was hoping the Microsoft Graph API would help me with this, but I can't find any guidance on how to do this. Is there a way to do this either with notifications or by polling/querying the API?

1

1 Answers

0
votes

The closest thing to what you're asking for is Azure AD Reporting API for Sign-in activity:

https://docs.microsoft.com/en-us/azure/active-directory/active-directory-reporting-api-sign-in-activity-reference

Note that, at this time, this is only available in the Azure AD Graph, not the Microsoft Graph.

https://graph.windows.net/contoso.com/activities/signinEvents?api-version=beta

You can filter by user and/or appDisplayName.

https://graph.windows.net/contoso.com/activities/signinEvents?api-version=beta&$filter=appDisplayName eq 'Office 365'

Doing some quick testing by launching the Office Portal, Outlook, Sharepoint, etc, I saw the following entries:

  • Office 365
  • O365 Suite UX
  • Office 365 Exchange Online
  • Office.com
  • Office 365 SharePoint Online
  • Skype Web Experience On Office 365

You'll need to do some experimentation to see if you can see entries for everything your interested in. I don't think you'll get entries down to the granularity level you seem to be interested (Word, Excel, PowerPoint).