Organisation aktualisierenUpdate organization
Namespace: microsoft.graphNamespace: microsoft.graph
Wichtig
APIs unter der /beta
Version in Microsoft Graph können geändert werden.APIs under the /beta
version in Microsoft Graph are subject to change. Die Verwendung dieser APIs in Produktionsanwendungen wird nicht unterstützt.Use of these APIs in production applications is not supported. Verwenden Sie die Versionsauswahl, um zu ermitteln, ob eine API in Version 1.0 verfügbar ist.To determine whether an API is available in v1.0, use the Version selector.
Mit dieser API können Sie die Eigenschaften der aktuell authentifizierten Organisation aktualisieren.Update the properties of the currently authenticated organization. In diesem Fall wird als eine Auflistung von genau einem Datensatz definiert, und daher muss seine organization
ID in der Anforderung angegeben werden.In this case, organization
is defined as a collection of exactly one record, and so its ID must be specified in the request. Die ID wird auch als tenantId der Organisation bezeichnet.The ID is also known as the tenantId of the organization.
BerechtigungenPermissions
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.One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
BerechtigungstypPermission type | Berechtigungen (von der Berechtigung mit den wenigsten Rechten zu der mit den meisten Rechten)Permissions (from least to most privileged) |
---|---|
Delegiert (Geschäfts-, Schul- oder Unikonto)Delegated (work or school account) | Organization.ReadWrite.All, Directory.AccessAsUser.AllOrganization.ReadWrite.All, Directory.AccessAsUser.All |
Delegiert (persönliches Microsoft-Konto)Delegated (personal Microsoft account) | Nicht unterstütztNot supported. |
AnwendungApplication | Organization.ReadWrite.AllOrganization.ReadWrite.All |
HTTP-AnforderungHTTP request
PATCH /organization/{id}
AnforderungsheaderRequest headers
NameName | BeschreibungDescription |
---|---|
AuthorizationAuthorization | Bearer {token}. Erforderlich.Bearer {token}. Required. |
Content-TypeContent-Type | application/jsonapplication/json |
AnforderungstextRequest body
Geben Sie im Anforderungstext die Werte für die relevanten Felder 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. Aus Gründen der Leistung sollten Sie vorhandene Werte, die nicht geändert wurden, nicht angeben.In the request body, supply the values for relevant fields that should be updated. Existing properties that are not included in the request body will maintain their previous values or be recalculated based on changes to other property values. For best performance you shouldn't include existing values that haven't changed.
EigenschaftProperty | TypType | BeschreibungDescription |
---|---|---|
marketingNotificationEmailsmarketingNotificationEmails | String collectionString collection | Hinweis: Lässt keine Nullwerte zu.Notes: not nullable. |
privacyProfileprivacyProfile | privacyProfileprivacyProfile | Das Datenschutzprofil einer Organisation ( „statementUrl“ und „contactEmail“ festlegen).The privacy profile of an organization (set statementUrl and contactEmail). |
securityComplianceNotificationMailssecurityComplianceNotificationMails | String collectionString collection | |
securityComplianceNotificationPhonessecurityComplianceNotificationPhones | String collectionString collection | |
technicalNotificationMailstechnicalNotificationMails | String collectionString collection | Hinweis: Lässt keine Nullwerte zu.Notes: not nullable. |
Da die Organisationsressource Erweiterungen unterstützt,können Sie den Vorgang verwenden, um eigene app-spezifische Daten in benutzerdefinierten Eigenschaften einer Erweiterung in einer vorhandenen Organisationsinstanz hinzuzufügen, zu aktualisieren oder PATCH
zu löschen.Since the organization resource supports extensions, you can use the PATCH
operation to add, update, or delete your own app-specific data in custom properties of an extension in an existing organization instance.
AntwortResponse
Wenn die Methode erfolgreich verläuft, wird der Antwortcode 204 No Content
zurückgegeben. Im Antworttext wird nichts zurückgegeben.If successful, this method returns 204 No Content
response code. It does not return anything in the response body.
BeispielExample
AnforderungRequest
Nachfolgend sehen Sie ein Beispiel der Anforderung.Here is an example of the request.
PATCH https://graph.microsoft.com/beta/organization/{id}
Content-type: application/json
Content-length: 411
{
"marketingNotificationEmails" : ["marketing@contoso.com"],
"privacyProfile" :
{
"contactEmail":"alice@contoso.com",
"statementUrl":"https://contoso.com/privacyStatement"
},
"securityComplianceNotificationMails" : ["security@contoso.com"],
"securityComplianceNotificationPhones" : ["(123) 456-7890"],
"technicalNotificationMails" : ["tech@contoso.com"]
}
AntwortResponse
Nachfolgend sehen Sie ein Beispiel der Antwort.Here is an example of the response.
HTTP/1.1 204 No Content