class GroupCreationParams
A data class representing parameters for creating a SharePoint group, inheriting from ClientValue to enable serialization for SharePoint API calls.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/portal/groups/creation_params.py
5 - 15
simple
Purpose
GroupCreationParams encapsulates the configuration needed to create a new SharePoint group through the Microsoft.SharePoint.Portal API. It provides a structured way to specify group classification, description, and creation options (such as site language). This class is designed to be serialized and sent as part of SharePoint REST API requests for group creation operations.
Source Code
class GroupCreationParams(ClientValue):
def __init__(self, classification="", description=""):
super(GroupCreationParams, self).__init__()
self.Classification = classification
self.Description = description
self.CreationOptions = ClientValueCollection(str)
self.CreationOptions.add("SPSiteLanguage:1033")
@property
def entity_type_name(self):
return "Microsoft.SharePoint.Portal.GroupCreationParams"
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
ClientValue | - |
Parameter Details
classification: Optional string parameter that specifies the classification or category of the group being created. Defaults to an empty string if not provided. Used for organizational taxonomy and governance purposes.
description: Optional string parameter that provides a textual description of the group's purpose or content. Defaults to an empty string if not provided. This description is typically displayed in SharePoint UI.
Return Value
Instantiation returns a GroupCreationParams object configured with the specified classification and description. The object has Classification, Description, and CreationOptions attributes set. The entity_type_name property returns the string 'Microsoft.SharePoint.Portal.GroupCreationParams' which identifies the SharePoint entity type for API serialization.
Class Interface
Methods
__init__(self, classification: str = '', description: str = '') -> None
Purpose: Initializes a new GroupCreationParams instance with optional classification and description, and sets up default creation options including site language
Parameters:
classification: String specifying the group classification/category, defaults to empty stringdescription: String providing a description of the group, defaults to empty string
Returns: None - constructor initializes the instance
@property entity_type_name(self) -> str
property
Purpose: Returns the SharePoint entity type name used for API serialization and identification
Returns: String 'Microsoft.SharePoint.Portal.GroupCreationParams' representing the SharePoint entity type
Attributes
| Name | Type | Description | Scope |
|---|---|---|---|
Classification |
str | Stores the classification or category of the group being created, used for organizational taxonomy | instance |
Description |
str | Stores the textual description of the group's purpose or content | instance |
CreationOptions |
ClientValueCollection[str] | Collection of creation options for the group, pre-populated with 'SPSiteLanguage:1033' (English US) by default. Can be extended with additional options as needed | instance |
Dependencies
office365
Required Imports
from office365.runtime.client_value import ClientValue
from office365.runtime.client_value_collection import ClientValueCollection
Usage Example
from office365.runtime.client_value import ClientValue
from office365.runtime.client_value_collection import ClientValueCollection
# Create group creation parameters with classification and description
params = GroupCreationParams(
classification="Public",
description="A team group for project collaboration"
)
# Access the attributes
print(params.Classification) # Output: Public
print(params.Description) # Output: A team group for project collaboration
print(params.entity_type_name) # Output: Microsoft.SharePoint.Portal.GroupCreationParams
# The CreationOptions collection is pre-populated with default language
print(params.CreationOptions) # Contains: SPSiteLanguage:1033
# Add additional creation options if needed
params.CreationOptions.add("AdditionalOption:Value")
# This object would typically be passed to a SharePoint API method
# Example: context.web.create_group(params)
Best Practices
- Always instantiate with meaningful classification and description values for better group organization and discoverability
- The CreationOptions collection is automatically initialized with default language setting (SPSiteLanguage:1033 for English). Modify only if different language or additional options are required
- This class is designed to be used as a parameter object for SharePoint group creation API calls, not for standalone use
- The entity_type_name property should not be modified as it's used internally by the office365 library for proper API serialization
- Ensure the parent ClientValue class is properly initialized by calling super().__init__() to maintain serialization capabilities
- Language code 1033 represents English (US). Change this value in CreationOptions if creating groups for different locales
Tags
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class GroupCreationInformation_v1 73.8% similar
-
class GroupCreationContext 65.5% similar
-
class SiteCreationProperties 65.1% similar
-
class FolderDeleteParameters 64.7% similar
-
class SiteCreationData 63.5% similar