Skip to content

Office 365 (Retired) Office 365 (Retired): Subscriptions

Summary

This module contains actions for managing subscriptions in Office 365.

Deprecated Plugin

This plugin will be retired in the future, please use the Azure AD plugin instead.

Actions

microsoft_graph.subscriptions.

assign_to_user

Assign a subscription licence to a user.

Minimum Plugin Version: 5.0.0

Input
  • client: a GraphClient

  • user_principal_name: the User's principal name

  • sku_id: the subscription SKU ID

  • disabled_plans: optional list of ServicePlans to disable while assigning the subscription

Enabling & Disabling Plans

You can also use this action to update a user's plans for a given subscription.

To disable plans for a subscription the user already has:

  • assign them the subscription
  • use the disabled_plans input to turn off the relevant plans

To enable plans for a subscription the user already has:

  • assign them the subscription
  • make sure the plans you want to enable are not supplied in disabled_plans

Users can select plans using actions in the service_plans module.

Each Subscription contains its associated ServicePlans.

Output

Nothing is outputted by this action.

Example
1
2
3
4
5
- microsoft_graph.subscriptions.assign_to_user:
    user_principal_name: john.smith@domain.com
  load:
    sku_id: subscription.sku_id
    client: graph_secrets

microsoft_graph.subscriptions.

display

Display subscriptions in a table.

The table will have the following columns:

  • Part Number
  • SKU ID
  • Consumed Units
  • Paid Units

Minimum Plugin Version: 1.0.0

Input
  • text: the title of the table

  • subscriptions: any number of Subscriptions

Output

Nothing is outputted by this action.

Example
1
2
3
4
5
6
7
8
9
- microsoft_graph.subscriptions.get_all:
  load:
    client: graph_secrets
  save: subscriptions

- microsoft_graph.subscriptions.display:
    text: All Subscriptions
  load:
    subscriptions: subscriptions

microsoft_graph.subscriptions.

display_for_users

Generate & display a table of Subscriptions & the Users assigned to each.

Minimum Plugin Version: 1.0.0

Input
Output

Nothing is outputted by this action.

Example
1
2
3
4
5
6
7
8
9
- microsoft_graph.users.get_all:
  load:
    client: graph_secrets
  save: users

- microsoft_graph.subscriptions.display_for_users:
  load:
    users: users
    client: graph_secrets

microsoft_graph.subscriptions.

get_all

Get all company subscriptions.

Minimum Plugin Version: 1.0.0

Input
Output

A list of Subscriptions.

Example
1
2
3
4
- microsoft_graph.subscriptions.get_all:
  load:
    client: graph_secrets
  save: subscriptions

microsoft_graph.subscriptions.

get_by_part_number

Get the company subscription with the supplied part number.

Minimum Plugin Version: 1.1.0

Input
  • client: a GraphClient

  • part_number: the subscription part number

Part Numbers

Subscription part numbers can be found here in the String ID column.

Output

A Subscription.

Example
1
2
3
4
5
- microsoft_graph.subscriptions.get_by_name:
    part_number: O365_BUSINESS_PREMIUM
  load:
    client: graph_secrets
  save: subscriptions

microsoft_graph.subscriptions.

get_for_user

Get all subscriptions assigned to a user.

Minimum Plugin Version: 1.0.0

Input
Output

A list of Subscriptions.

Example
1
2
3
4
5
- microsoft_graph.subscriptions.get_for_user:
    user_principal_name: example.user@domain.net
  load:
    client: graph_secrets
  save: subscriptions

microsoft_graph.subscriptions.

remove_from_user

Remove a subscription licence from a user.

Minimum Plugin Version: 1.0.0

Input
  • client: a GraphClient

  • user_principal_name: the User's principal name

  • sku_id: the subscription SKU ID

Output

Nothing is outputted by this action.

Example
1
2
3
4
5
- microsoft_graph.subscriptions.remove_from_user:
    user_principal_name: john.smith@domain.com
  load:
    sku_id: subscription.sku_id
    client: graph_secrets

microsoft_graph.subscriptions.

select

Display subscriptions in a table & prompt the task operator to make a selection.

The table will have the following columns:

  • Part Number
  • SKU ID
  • Consumed Units
  • Paid Units

Minimum Plugin Version: 1.0.0

Input
  • text: the title of the table

  • subscriptions: any number of Subscriptions

  • minimum: the minimum number of selections

  • maximum: the maximum number of selections

Output

A Selection containing:

Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
- microsoft_graph.subscriptions.get_all:
  load:
    client: graph_secrets
  save: subscriptions

- microsoft_graph.subscriptions.select:
    text: Select Subscriptions
  load:
    subscriptions: subscriptions
  save: selection

microsoft_graph.subscriptions.

select_one

Display subscriptions in a table & prompt the task operator to select one.

The table will have the following columns:

  • Part Number
  • SKU ID
  • Consumed Units
  • Paid Units

Minimum Plugin Version: 1.0.0

Input
  • text: the title of the table

  • subscriptions: any number of Subscriptions

Output

A single Subscription.

Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
- microsoft_graph.subscriptions.get_all:
  load:
    client: graph_secrets
  save: subscriptions

- microsoft_graph.subscriptions.select_one:
    text: Select a Subscription
  load:
    subscriptions: subscriptions
  save: subscription