Office 365 (Microsoft Graph) Office 365 (Microsoft Graph): Subscriptions

Summary

This module contains actions for managing subscriptions in Office 365.

Actions

microsoft_graph.subscriptions.

assign_to_user

Assign a subscription licence to 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.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
- microsoft_graph.subscriptions.get_for_user:
  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