FeatureRolloutpolicy aktualisieren
Artikel
07/18/2022
2 Minuten Lesedauer
3 Mitwirkende
In diesem Artikel
Namespace: microsoft.graph
Dient zum Aktualisieren der Eigenschaften des featureRolloutPolicy-Objekts.
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 .
Berechtigungstyp
Berechtigungen (von der Berechtigung mit den wenigsten Rechten zu der mit den meisten Rechten)
Delegiert (Geschäfts-, Schul- oder Unikonto)
Directory.ReadWrite.All
Delegiert (persönliches Microsoft-Konto)
Nicht unterstützt
Anwendung
Nicht unterstützt
HTTP-Anforderung
PATCH /policies/featureRolloutPolicies/{id}
Name
Beschreibung
Authorization
Bearer {token}. Erforderlich
Anforderungstext
Geben Sie im Anforderungstext die Werte für relevante Eigenschaften an, die aktualisiert werden sollen. Vorhandene Eigenschaften, die nicht im Anforderungstext enthalten sind, behalten ihre vorherigen Werte oder werden basierend auf Änderungen an anderen Eigenschaftswerten neu berechnet. Geben Sie aus Gründen der Leistung vorhandene Werte, die nicht geändert wurden, nicht an.
Eigenschaft
Typ
Beschreibung
description
Zeichenfolge
Eine Beschreibung für diese Richtlinie.
displayName
Zeichenfolge
Der Anzeigename für diese Richtlinie.
isAppliedToOrganization
Boolescher Wert
Gibt an, ob diese Featurerolloutrichtlinie auf die gesamte Organisation angewendet werden soll.
isEnabled
Boolescher Wert
Gibt an, ob das Featurerollout aktiviert ist.
Antwort
Wenn die Methode erfolgreich verläuft, wird der Antwortcode 204 No content zurückgegeben.
Beispiele
Anforderung
Nachfolgend sehen Sie ein Beispiel der Anforderung.
PATCH https://graph.microsoft.com/v1.0/policies/featureRolloutPolicies/d7ab4886-d7f0-441b-a5e6-e62d7328d18a
Content-type: application/json
{
"displayName": "PasswordHashSync Rollout Policy",
"description": "PasswordHashSync Rollout Policy",
"isEnabled": true,
"isAppliedToOrganization": false
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var featureRolloutPolicy = new FeatureRolloutPolicy
{
DisplayName = "PasswordHashSync Rollout Policy",
Description = "PasswordHashSync Rollout Policy",
IsEnabled = true,
IsAppliedToOrganization = false
};
await graphClient.Policies.FeatureRolloutPolicies["{featureRolloutPolicy-id}"]
.Request()
.UpdateAsync(featureRolloutPolicy);
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);
const featureRolloutPolicy = {
displayName: 'PasswordHashSync Rollout Policy',
description: 'PasswordHashSync Rollout Policy',
isEnabled: true,
isAppliedToOrganization: false
};
await client.api('/policies/featureRolloutPolicies/d7ab4886-d7f0-441b-a5e6-e62d7328d18a')
.update(featureRolloutPolicy);
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:@"/policies/featureRolloutPolicies/d7ab4886-d7f0-441b-a5e6-e62d7328d18a"]]];
[urlRequest setHTTPMethod:@"PATCH"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
MSGraphFeatureRolloutPolicy *featureRolloutPolicy = [[MSGraphFeatureRolloutPolicy alloc] init];
[featureRolloutPolicy setDisplayName:@"PasswordHashSync Rollout Policy"];
[featureRolloutPolicy setDescription:@"PasswordHashSync Rollout Policy"];
[featureRolloutPolicy setIsEnabled: true];
[featureRolloutPolicy setIsAppliedToOrganization: false];
NSError *error;
NSData *featureRolloutPolicyData = [featureRolloutPolicy getSerializedDataWithError:&error];
[urlRequest setHTTPBody:featureRolloutPolicyData];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[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();
FeatureRolloutPolicy featureRolloutPolicy = new FeatureRolloutPolicy();
featureRolloutPolicy.displayName = "PasswordHashSync Rollout Policy";
featureRolloutPolicy.description = "PasswordHashSync Rollout Policy";
featureRolloutPolicy.isEnabled = true;
featureRolloutPolicy.isAppliedToOrganization = false;
graphClient.policies().featureRolloutPolicies("d7ab4886-d7f0-441b-a5e6-e62d7328d18a")
.buildRequest()
.patch(featureRolloutPolicy);
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)
requestBody := msgraphsdk.NewFeatureRolloutPolicy()
displayName := "PasswordHashSync Rollout Policy"
requestBody.SetDisplayName(&displayName)
description := "PasswordHashSync Rollout Policy"
requestBody.SetDescription(&description)
isEnabled := true
requestBody.SetIsEnabled(&isEnabled)
isAppliedToOrganization := false
requestBody.SetIsAppliedToOrganization(&isAppliedToOrganization)
featureRolloutPolicyId := "featureRolloutPolicy-id"
graphClient.Policies().FeatureRolloutPoliciesById(&featureRolloutPolicyId).Patch(requestBody)
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
Import-Module Microsoft.Graph.Identity.SignIns
$params = @{
DisplayName = "PasswordHashSync Rollout Policy"
Description = "PasswordHashSync Rollout Policy"
IsEnabled = $true
IsAppliedToOrganization = $false
}
Update-MgPolicyFeatureRolloutPolicy -FeatureRolloutPolicyId $featureRolloutPolicyId -BodyParameter $params
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
Antwort
Nachfolgend sehen Sie ein Beispiel der Antwort.
HTTP/1.1 204 No Content