Jacob Filtenborg
Jacob Filtenborg

Reputation: 137

Create Office 365 Groups programmatically

Microsoft recently released the Office 365 Groups feature: (http://www.sharepointtalk.net/2015/01/the-anatomy-of-office-365-groups.html?showComment=1429612834863#c6525209790902174448)

I would like to create Office 365 Groups programmatically, but i am not sure how to do this?

Any help is appreciated.

Upvotes: 0

Views: 1926

Answers (4)

Mehmet Erkan
Mehmet Erkan

Reputation: 31

For Office 365 Groups see this office graph API sample from Microsoft Office 365 Graph API

POST https://graph.microsoft.com/beta/groups
Content-type: application/json
Content-length: 244

{
  "description": "description-value",
  "displayName": "displayName-value",
  "groupTypes": [
    "Unified"
  ],
  "mailEnabled": true,
  "mailNickname": "mailNickname-value",
  "securityEnabled": false
}

Upvotes: 2

Yina - MSFT
Yina - MSFT

Reputation: 1786

Using the Office 365 unified API you can create groups. There are 4 types of groups: DLs, Security Groups, Email enabled Security Groups and Unified Groups. Unified groups are the ones that have content, like conversations, events and files.

You can create groups by doing a POST to https://graph.microsoft.com and passing the groupType='Unified'

However, due to the distributed nature of the services, after creating the unified group via the API, you will not get instant access to the group content.

In addition, the groups functionality is still being deployed to all the production services so you might not have it in your tenant yet.

Upvotes: 1

Joe Healy
Joe Healy

Reputation: 5817

More on groups - create. You cannot create distribution groups programmatically, but you can create security groups.

From https://msdn.microsoft.com/office/office365/HowTo/office-365-unified-api-reference#msg_ref_entitySet_groups groups Summary : Representing a tenant-level resource collection of the unified Group type. Use a POST request against this collection to create a group and add it to the collection. Use a GET request to view existing groups collection. Path :/{tenant}/groups Operations :POST, GET

From https://msdn.microsoft.com/en-us/library/azure/hh974486.aspx You can only create security groups using Azure AD Graph (you cannot create mail-enabled security groups or mail distribution groups). For this reason the mailEnabled property must be set false and the securityEnabled property must be set true when creating a group.

Upvotes: 1

Andrew J
Andrew J

Reputation: 11

Currently this is not supported, however this would be a very nice feature to have with the new Office 365 APIs recently released if we can get it. Reference: http://community.office365.com/en-us/f/158/t/345331.aspx

Upvotes: 1

Related Questions