Create group with classification

New Contributor


I'm trying to create new group with predefined classification (tenant-level groups settings with ClassificationList were successfully created via PowerShell - using approach from the following article In my test I also use 3 classifications: Internal,External,Confidential).


When I tried to create new Group via Graph client library for .Net and specified Classification explicitly:

var newGroup = new Microsoft.Graph.Group
    DisplayName = displayName,
    Description = description,
    Classification = "Confidential"
var addedGroup = await graphClient.Groups.Request().AddAsync(newGroup);

I got the following error: Property 'classification' is read-only and cannot be set.


When I tried to update classification of existing group via Graph API:{groupId}
    "classification" : "internal"

then got Bad request with the same error: Property 'classification' is read-only and cannot be set.


The only method which uses classification for creating new group which I found at the moment is CreateGroupEx from Sharepoint API:

POST https://{tenant}


Is there a way to specify classification for the group via Graph API?

1 Reply

For those who is interested: it is possible to set group's classification, but with beta API version, not with v1.0. Same approach is used in OfficeDevPnP's SiteExtension.SetSiteClassification method: