Connectors / Service / Office365 Management

Office365 Management

Office365 Management

The Office 365 Management Activity service provides information about a user, admin, system, and policy actions and events from Office 365 and Azure AD activity logs.

Overview

Office365 Management allows users to manage applications, services, data, devices, and users across Microsoft 365 services and Azure Active Directory (Azure AD) by providing audit activity logs.

API INFO: The Base URL used for the office365-management connector is https://manage.office.com/api/v1.0/common/activity/feed. More information can be found on their main API documentation (v1.0) site.

Authentication

IMPORTANT!: In order to authenticate and use the Office365 Management connector, users must have an Audit log search turned on for their Microsoft Azure account. To be able to switch this on, users have to be assigned permissions in Exchange Online. Please note that Microsoft suggests that it may take several hours after you turn on the audit log search before you can return results. A detailed guide can be found at Microsoft Audit Log

When using the Office365 management connector, the first thing you will need to do is to go to your Tray.io account page and select the relevant workflow. Once within the workflow builder, search and drag the Office365 Management connector from the connectors panel (on the left-hand side) onto your workflow.

With the Office365 management connector step highlighted, in the properties panel to the right of the builder, click on the Authenticate tab and 'Add new authentication'.

This will result in a Tray.io authentication pop-up modal. You will first need to name your authentication and select the type of authentication you wish to create ('Personal' or 'Organisational'). Proceed by clicking 'Next Step'.

Once you click 'Create authentication' on the next page, it will redirect you to login into your Microsoft Azure account. Proceed to add your login details. Once you are logged in, go back to your authentication field (within the workflow dashboard properties panel from earlier), and select the recently added authentication from the dropdown options now available.

Your connector authentication setup should now be complete.

Available Operations

The examples below show one or two of the available connector operations in use.

Please see the Full Operations Reference at the end of this page for details on all available operations for this connector.

Notes on using Office365 Management

When creating a new subscription, please remember that there can be only one active subscription for each content type. And so, using the Create or update subscription operation on an existing subscription will update that subscription.

Using the Raw HTTP Request ('Universal Operation')

As of version 1.0, you can effectively create your own operations.

This is a very powerful feature which you can put to use when there is an endpoint in Office365 Management which is not used by any of our operations.

To use this you will first of all need to research the endpoint in the Office365 Management API documentation v1.0, to find the exact format that Office365 Management will be expecting the endpoint to be passed in.

Note that you will only need to add the suffix to the endpoint, as the base URL will be automatically set (the base URL is picked up from the value you entered when you created your authentication).

The base URL for Office365 Management is: https://manage.office.com/api/v1.0/common/activity/feed

For example, say that the 'List current subscriptions' operation did not exist in our Office365 Management connector, and you wanted to use this endpoint. You would use the Office365 Management API docs to find the relevant endpoint - which in this case is a GET request called: /subscriptions/list.

More details about this endpoint can be found here.

As you can see, there is also the option to include a query parameter, should you wish to do so. So if you know what your method, endpoint, and details of your query parameters are, you can get the current subscriptions information with the following settings:

Method: GET

Endpoint: /subscriptions/list

Final outcome being: https://manage.office.com/api/v1.0/common/activity/feed/subscriptions/list

When run, this will return a list of current subscriptions.

Example Usage

TRAY POTENTIAL: Tray.io is extremely flexible. By design there is no fixed way of working with it - you can pull whatever data you need from other services and work with it using our core and helper connectors. This demo which follows shows only one possible way of working with Tray.io and the office365-management connector. Once you've finished working through this example please see our Introduction to working with data and jsonpaths page and Data Guide for more details.

Below is an example of a way in which you could potentially use the Office365 Management connector to list current subscriptions and list the available content for each subscription.

EXTRA AUTHS: In order to complete this workflow, you will also need to be authenticated with the office365-management connector.

The steps will be as follows:

  1. Setup using a manual trigger and List current subscriptions
  2. Add a Loop connector to iterate through the subscriptions found
  3. List the available content for each subscription, individually

Your completed workflow should look similar to this:

1 - Setup Trigger & List current subscriptions

Select the Manual trigger from the trigger options available.

After you have been redirected to the Tray.io workflow dashboard, from the connectors panel on the left, add an Office365 Management connector to your workflow. Set the operation to 'List current subscriptions'.

Feel free to re-name your steps as you go along to make things clearer for yourself and other users. The operation names themselves often suffice.

When run, this workflow will list all the current subscriptions under your Microsoft Azure credentials. You can also check the Debug panel for more details on the provided output:

2 - Loop and list available content

Next, search for the Loop connector within your connector panel, and drag it into your workflow as your next step. Set your operations to 'Loop list'.

The Loop connector allows you to iterate through a list of results. In this example, we will use it to iterate through the data found within the previous Office365 Management connector step.

In order to specify the list, you want to loop through, start by using the list mapping icon (found next to the list input field, within the properties panel) to generate the connector-snake.

While hovering over the 'List current subscriptions' step (with the tail end of the connector-snake), select results from the list of output properties displayed. This will auto-populate a jsonpath within your list input field, and update the type selector to jsonpath.

For more clarification on the pathways, you have available, open the Debug panel to view your step's Input and Output.

JSONPATHS: For more information on what jsonpaths are and how to use jsonpaths with Tray.io, please see our Intro page and Data Guide for more details.
CONNECTOR-SNAKE: The simplest and easiest way to generate your jsonpaths is to use our feature called the Connector-snake. Please see the main page for more details.

When run, this workflow will iterate through the list of current subscriptions provided by the earlier step.

The last step is to drag an Office365 Management connector inside of the Loop step itself. Set the operation to 'List available content'. As you can see, the 'contentType' field is required.

INTERPOLATION: When you wish to include JSON generated data within another input/ output/ result, use our Interpolation method as described here.

When run, the workflow will now iterate through the list of current subscriptions and list the available content for each one.

BEST PRACTICES: Whenever you do decide to create your own workflow, please make sure you take a look at our Managing data best practices guide.

All Operations

Latest version:

1.0