class GroupSetting
GroupSetting is an Entity subclass that represents configuration settings for Microsoft 365 groups, controlling behaviors like blocked word lists for display names and guest user permissions.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/directory/groups/setting.py
4 - 6
simple
Purpose
This class models group settings in Microsoft 365 environments, allowing management of group-level configurations such as naming policies (blocked words), guest user permissions (whether guests can be group owners), and other group behavior controls. It inherits from Entity, providing standard entity operations for interacting with Microsoft Graph API group settings resources.
Source Code
class GroupSetting(Entity):
"""Group settings control behaviors such as blocked word lists for group display names or whether guest users are
allowed to be group owners."""
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
Entity | - |
Parameter Details
__init__: Inherits constructor from Entity base class. Typically accepts context and resource path parameters for Microsoft Graph API communication, though exact parameters depend on Entity implementation.
Return Value
Instantiation returns a GroupSetting object that represents a group settings resource. Methods inherited from Entity likely return various types depending on the operation (e.g., self for chaining, data dictionaries for queries, None for updates).
Class Interface
Methods
__init__(context, resource_path=None)
Purpose: Initializes a GroupSetting entity instance (inherited from Entity base class)
Parameters:
context: The client context for API communicationresource_path: Optional resource path for the specific group setting resource
Returns: GroupSetting instance
Attributes
| Name | Type | Description | Scope |
|---|---|---|---|
display_name |
str | The display name of the group setting | instance |
template_id |
str | The unique identifier for the template that defines this group setting | instance |
values |
list | Collection of name-value pairs containing the setting values | instance |
Dependencies
office365
Required Imports
from office365.entity import Entity
from office365.directory.group_setting import GroupSetting
Usage Example
from office365.runtime.auth.client_credential import ClientCredential
from office365.graph_client import GraphClient
from office365.directory.group_setting import GroupSetting
# Authenticate
credentials = ClientCredential('client_id', 'client_secret')
client = GraphClient(credentials)
# Get group settings
group_settings = client.group_settings.get().execute_query()
for setting in group_settings:
print(f"Setting: {setting.display_name}")
print(f"Template ID: {setting.template_id}")
# Access specific setting
setting = client.group_settings.get_by_id('setting_id').execute_query()
print(f"Values: {setting.values}")
Best Practices
- Always authenticate properly with appropriate Microsoft Graph API permissions before accessing group settings
- Use execute_query() after get() operations to actually fetch data from the API
- Group settings are typically read-only for most applications; modifications require elevated permissions
- Cache group settings when possible as they don't change frequently
- Handle API rate limiting and implement retry logic for production applications
- Validate setting values against the template definition before attempting updates
- Be aware that group settings apply at the tenant or group level and affect multiple users
Tags
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class GroupSettingTemplate 73.5% similar
-
class UserSettings 63.3% similar
-
class PlannerGroup 58.4% similar
-
class Group 58.4% similar
-
class GroupProfile 57.8% similar