groupSetting abrufen
Artikel
07/18/2022
4 Minuten Lesedauer
3 Mitwirkende
In diesem Artikel
Namespace: microsoft.graph
Dient zum Abrufen der Eigenschaften eines bestimmten Gruppeneinstellungsobjekts. Die Einstellung kann eine mandanten- oder gruppenspezifische Einstellung sein.
Berechtigungen
Eine der nachfolgenden Berechtigungen ist erforderlich, um diese API aufrufen zu können. Weitere Informationen, unter anderem zur Auswahl von Berechtigungen, finden Sie im Artikel zum Thema Berechtigungen .
Mandantenweite Einstellungen auflisten
Berechtigungstyp
Berechtigungen (von der Berechtigung mit den wenigsten Rechten zu der mit den meisten Rechten)
Delegiert (Geschäfts-, Schul- oder Unikonto)
Directory.Read.All, Directory.ReadWrite.All
Delegiert (persönliches Microsoft-Konto)
Nicht unterstützt
Anwendung
Directory.Read.All, Directory.ReadWrite.All
Gruppenspezifische Einstellungen auflisten
Berechtigungstyp
Berechtigungen (von der Berechtigung mit den wenigsten Rechten zu der mit den meisten Rechten)
Delegiert (Geschäfts-, Schul- oder Unikonto)
Group.Read.All, Group.ReadWrite.All
Delegiert (persönliches Microsoft-Konto)
Nicht unterstützt
Anwendung
Group.Read.All, Group.ReadWrite.All
HTTP-Anforderung
Rufen Sie eine mandantenweite Einstellung ab.
GET /groupSettings/{groupSettingId}
Rufen Sie eine gruppenspezifische Einstellung ab.
GET /groups/{groupId}/settings/{groupSettingId}
Optionale Abfrageparameter
Diese Methode unterstützt den $select OData-Abfrageparameter , um die Antwort anzupassen.
Name
Beschreibung
Authorization
Bearer {token}. Erforderlich.
Anforderungstext
Geben Sie für diese Methode keinen Anforderungstext an.
Antwort
Bei erfolgreicher Ausführung gibt die Methode einen Antwortcode und ein 200 OK groupSetting-Objekt im Antworttext zurück.
Beispiele
Beispiel 1: Abrufen einer Gruppeneinstellung für eine bestimmte Gruppe
Anforderung
GET https://graph.microsoft.com/v1.0/groups/05aa6a98-956a-45c0-b13b-88076a23f2cd/settings/a06fa228-3042-4662-bd09-33e298da1afe
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var groupSetting = await graphClient.Groups["{group-id}"].Settings["{groupSetting-id}"]
.Request()
.GetAsync();
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var groupSetting = await graphClient.Groups["{group-id}"].Settings["{groupSetting-id}"]
.Request()
.GetAsync();
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
const options = {
authProvider,
};
const client = Client.init(options);
let groupSetting = await client.api('/groups/05aa6a98-956a-45c0-b13b-88076a23f2cd/settings/a06fa228-3042-4662-bd09-33e298da1afe')
.get();
const options = {
authProvider,
};
const client = Client.init(options);
let groupSetting = await client.api('/groups/05aa6a98-956a-45c0-b13b-88076a23f2cd/settings/a06fa228-3042-4662-bd09-33e298da1afe')
.get();
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/groups/05aa6a98-956a-45c0-b13b-88076a23f2cd/settings/a06fa228-3042-4662-bd09-33e298da1afe"]]];
[urlRequest setHTTPMethod:@"GET"];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
MSGraphGroupSetting *groupSetting = [[MSGraphGroupSetting alloc] initWithData:data error:&nserror];
}];
[meDataTask execute];
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/groups/05aa6a98-956a-45c0-b13b-88076a23f2cd/settings/a06fa228-3042-4662-bd09-33e298da1afe"]]];
[urlRequest setHTTPMethod:@"GET"];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
MSGraphGroupSetting *groupSetting = [[MSGraphGroupSetting alloc] initWithData:data error:&nserror];
}];
[meDataTask execute];
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
GroupSetting groupSetting = graphClient.groups("05aa6a98-956a-45c0-b13b-88076a23f2cd").settings("a06fa228-3042-4662-bd09-33e298da1afe")
.buildRequest()
.get();
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
GroupSetting groupSetting = graphClient.groups("05aa6a98-956a-45c0-b13b-88076a23f2cd").settings("a06fa228-3042-4662-bd09-33e298da1afe")
.buildRequest()
.get();
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
groupId := "group-id"
groupSettingId := "groupSetting-id"
result, err := graphClient.GroupsById(&groupId).SettingsById(&groupSettingId).Get()
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
groupId := "group-id"
groupSettingId := "groupSetting-id"
result, err := graphClient.GroupsById(&groupId).SettingsById(&groupSettingId).Get()
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
Antwort
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#groupSettings/$entity",
"id": "a06fa228-3042-4662-bd09-33e298da1afe",
"displayName": "Group.Unified.Guest",
"templateId": "08d542b9-071f-4e16-94b0-74abb372e3d9",
"values": [
{
"name": "AllowToAddGuests",
"value": "false"
}
]
}
Beispiel 2: Abrufen der Gruppeneinstellungen für alle Microsoft 365 Gruppen
Anforderung
GET https://graph.microsoft.com/v1.0/groupSettings/84af2ca5-c274-41bf-86e4-6e374ec4def6
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var groupSetting = await graphClient.GroupSettings["{groupSetting-id}"]
.Request()
.GetAsync();
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var groupSetting = await graphClient.GroupSettings["{groupSetting-id}"]
.Request()
.GetAsync();
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
const options = {
authProvider,
};
const client = Client.init(options);
let groupSetting = await client.api('/groupSettings/84af2ca5-c274-41bf-86e4-6e374ec4def6')
.get();
const options = {
authProvider,
};
const client = Client.init(options);
let groupSetting = await client.api('/groupSettings/84af2ca5-c274-41bf-86e4-6e374ec4def6')
.get();
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/groupSettings/84af2ca5-c274-41bf-86e4-6e374ec4def6"]]];
[urlRequest setHTTPMethod:@"GET"];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
MSGraphGroupSetting *groupSetting = [[MSGraphGroupSetting alloc] initWithData:data error:&nserror];
}];
[meDataTask execute];
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/groupSettings/84af2ca5-c274-41bf-86e4-6e374ec4def6"]]];
[urlRequest setHTTPMethod:@"GET"];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
MSGraphGroupSetting *groupSetting = [[MSGraphGroupSetting alloc] initWithData:data error:&nserror];
}];
[meDataTask execute];
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
GroupSetting groupSetting = graphClient.groupSettings("84af2ca5-c274-41bf-86e4-6e374ec4def6")
.buildRequest()
.get();
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
GroupSetting groupSetting = graphClient.groupSettings("84af2ca5-c274-41bf-86e4-6e374ec4def6")
.buildRequest()
.get();
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
groupSettingId := "groupSetting-id"
result, err := graphClient.GroupSettingsById(&groupSettingId).Get()
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
groupSettingId := "groupSetting-id"
result, err := graphClient.GroupSettingsById(&groupSettingId).Get()
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
Antwort
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#groupSettings/$entity",
"id": "84af2ca5-c274-41bf-86e4-6e374ec4def6",
"displayName": "Group.Unified",
"templateId": "62375ab9-6b52-47ed-826b-58e47e0e304b",
"values": [
{
"name": "EnableMIPLabels",
"value": "true"
},
{
"name": "CustomBlockedWordsList",
"value": ""
},
{
"name": "EnableMSStandardBlockedWords",
"value": "true"
},
{
"name": "ClassificationDescriptions",
"value": ""
},
{
"name": "DefaultClassification",
"value": ""
},
{
"name": "PrefixSuffixNamingRequirement",
"value": "[Contoso-][GroupName]"
},
{
"name": "AllowGuestsToBeGroupOwner",
"value": "false"
},
{
"name": "AllowGuestsToAccessGroups",
"value": "true"
},
{
"name": "GuestUsageGuidelinesUrl",
"value": "https://privacy.contoso.com/privacystatement"
},
{
"name": "GroupCreationAllowedGroupId",
"value": ""
},
{
"name": "AllowToAddGuests",
"value": "true"
},
{
"name": "UsageGuidelinesUrl",
"value": ""
},
{
"name": "ClassificationList",
"value": ""
},
{
"name": "EnableGroupCreation",
"value": "true"
}
]
}