Office365 ManagementThe 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.
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.
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.
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:
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:
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:
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.
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.
The steps will be as follows:
- Setup using a manual trigger and List current subscriptions
- Add a Loop connector to iterate through the subscriptions found
- 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.
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.
When run, the workflow will now iterate through the list of current subscriptions and list the available content for each one.