Skip to content

graph o365group add

Creates Office 365 Group

Usage

graph o365group add [options]

Options

Option Description
--help output usage information
-n, --displayName <displayName> Display name for the Office 365 Group
-d, --description <description> Description for the Office 365 Group
-m, --mailNickname <mailNickname> Name to use in the group e-mail (part before the @)
--owners [owners] Comma-separated list of Office 365 Group owners
--members [members] Comma-separated list of Office 365 Group members
--isPrivate [isPrivate] Set to true if the Office 365 Group should be private and to false if it should be public (default)
-l, --logoPath [logoPath] Local path to the image file to use as group logo
-o, --output [output] Output type. json|text. Default text
--verbose Runs command with verbose logging
--debug Runs command with debug logging

Important

Before using this command, log in to the Microsoft Graph, using the graph login command.

Remarks

To create an Office 365 Group, you have to first log in to the Microsoft Graph using the graph login command, eg. graph login.

When specifying the path to the logo image you can use both relative and absolute paths. Note, that ~ in the path, will not be resolved and will most likely result in an error.

Examples

Create a public Office 365 Group

graph o365group add --displayName Finance --description 'This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more.' --mailNickname finance

Create a private Office 365 Group

graph o365group add --displayName Finance --description 'This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more.' --mailNickname finance --isPrivate true

Create a public Office 365 Group and set specified users as its owners

graph o365group add --displayName Finance --description 'This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more.' --mailNickname finance --owners DebraB@contoso.onmicrosoft.com,DiegoS@contoso.onmicrosoft.com

Create a public Office 365 Group and set specified users as its members

graph o365group add --displayName Finance --description 'This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more.' --mailNickname finance --members DebraB@contoso.onmicrosoft.com,DiegoS@contoso.onmicrosoft.com

Create a public Office 365 Group and set its logo

graph o365group add --displayName Finance --description 'This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more.' --mailNickname finance --logoPath images/logo.png