Groups
Includes metadata about Microsoft 365 Groups, such as group names, descriptions, email aliases, and visibility settings.
テーブル固有の情報
Groups には管理者権限が必要です。それらを使用するには、独自のカスタムOAuth アプリを作成して、適切なOAuthClientId とOAuthClientSecret を 設定する必要があります。このアプリでは、Group.Read.All とGroup.ReadWrite.All の権限をリクエストするように設定する必要があります。 これは、https://apps.dev.microsoft.com またはhttp://portal.azure.com の[App Registrations]パネルで設定できます。カスタムアプリの作成に関する 詳細は、Entra ID(Azure AD)アプリケーションの作成 を参照してください。
Groups 権限を認可するには、管理者は組織全体に対してGroups のアクセス許可を付与する必要があります。これは、管理者の認可エンドポイントを
介して実行できます。管理者に次のWeb ページに移動して許可を与えさせるだけです。その後、通常どおりにOAuth 認可を実行します。
https://login.microsoftonline.com/common/adminconsent?client_id=[YourClientId]&redirect_uri=http://localhost:33333
組織に複数のテナントがある場合は、url の/common/ をテナントのID に置き換えて、どのテナントに権限を付与するかを指定できます。
Select
すべてのグループを取得したり、GroupId (Id) を指定したり、あるいは特定のカラムでフィルタしたりします。
SELECT * FROM Groups WHERE Id = 'Group Id here' SELECT Id, Description, DisplayName FROM Groups WHERE DisplayName = 'test'
Insert
新しいSecurity Group を作成するには、以下が必要です。
INSERT INTO Groups (DisplayName, MailEnabled, MailNickname, SecurityEnabled) VALUES ('Test group', false, 'test', true)
Columns
| Name | Type | ReadOnly | References | Description |
| id [KEY] | String | True |
Globally Unique Identifier (GUID) for the Microsoft 365 group. | |
| Etag | String | False |
Entity tag value used for optimistic concurrency checks on the group record. | |
| deletedDateTime | Datetime | False |
Date and time when the group was soft deleted. Null if the group is active. | |
| allowExternalSenders | Bool | False |
Indicates whether people outside the organization can send email to the group. | |
| assignedLabels | String | False |
Sensitivity labels currently applied to the group, stored in JSON format. | |
| assignedLicenses | String | False |
List of Azure Active Directory license SKUs that have been assigned to the group. | |
| autoSubscribeNewMembers | Bool | False |
Indicates whether any new member added to the group is automatically subscribed to receive email conversations. | |
| classification | String | False |
Data classification label, such as Public or Confidential, that the organization has applied to the group. | |
| createdDateTime | Datetime | False |
Timestamp indicating when the group was created. | |
| description | String | False |
Optional text describing the group's purpose or intended use. | |
| displayName | String | False |
Friendly display name for the group as shown in address books. | |
| expirationDateTime | Datetime | False |
Date and time when the group expires and is deleted if it is not renewed. | |
| groupTypes | String | False |
Collection that defines the group type. Accepted values are Unified for Microsoft 365 groups, DynamicMembership for dynamic groups. | |
| hasMembersWithLicenseErrors | Bool | False |
Indicates whether any group members have license assignment errors. | |
| hideFromAddressLists | Bool | False |
Indicates whether the group is hidden from the global address list. | |
| hideFromOutlookClients | Bool | False |
Indicates whether the group does not appear in Outlook clients. | |
| isArchived | Bool | False |
Indicates whether the group has been archived in Microsoft Teams. | |
| isSubscribedByMail | Bool | False |
Indicates whether the current user is subscribed to receive email for this group. | |
| licenseProcessingState_state | String | False |
Current status of processing group-based license assignments, such as InProgress or Completed. | |
| String | False |
Primary SMTP address of the group. | ||
| mailEnabled | Bool | False |
Indicates whether the group is configured to receive mail. Combined with securityEnabled determines group category. | |
| mailNickname | String | False |
Alias for the group that is unique within the organization and forms the local part of its email address. | |
| membershipRule | String | False |
Rule expression that defines the dynamic group membership, written in Azure Active Directory rule syntax. | |
| membershipRuleProcessingState | String | False |
Processing state of the dynamic membership rule, such as On or Paused. | |
| onPremisesDomainName | String | False |
Domain name where the corresponding on-premises group is located. | |
| onPremisesLastSyncDateTime | Datetime | False |
Timestamp when the group was last synchronized from the on-premises directory. | |
| onPremisesNetBiosName | String | False |
NetBIOS name of the on-premises domain for the group. | |
| onPremisesProvisioningErrors | String | False |
Collection of errors encountered during on-premises synchronization provisioning. | |
| onPremisesSamAccountName | String | False |
Security Account Manager (SAM) account name of the on-premises group. | |
| onPremisesSecurityIdentifier | String | False |
On-premises security identifier (SID) that maps to the cloud group. | |
| onPremisesSyncEnabled | Bool | False |
Indicates whether the group continues to be synchronized from the on-premises directory. | |
| preferredDataLocation | String | False |
Azure geography where the group's SharePoint and OneDrive data is stored. | |
| preferredLanguage | String | False |
Default language tag, for example en-US, used in group communications. | |
| proxyAddresses | String | False |
Set of proxy email addresses assigned to the group, such as SMTP:[email protected], sip:[email protected]. | |
| renewedDateTime | Datetime | False |
Timestamp when the group was last renewed through lifecycle policy. | |
| securityEnabled | Bool | False |
Indicates whether the group is security-enabled. When true and mailEnabled is also true, the group is a mail-enabled security group. | |
| securityIdentifier | String | False |
SID assigned to the group in Azure Active Directory. | |
| theme | String | False |
Custom theme identifier applied to the group in SharePoint or Teams. | |
| unseenCount | Int | False |
Number of group posts that the current user has not yet read. | |
| visibility | String | False |
Defines who can see the group. Possible values are Private, Public, HiddenMembership, or empty (interpreted as Public). |