ContactFolder erstellenCreate ContactFolder
Namespace: microsoft.graphNamespace: microsoft.graph
Dient zum Erstellen eines neuen contactFolder als untergeordnetes Element eines bestimmten Ordners.Create a new contactFolder as a child of a specified folder.
Sie können auch eine neue Ressource des Typs „contactFolder“ im Standardkontaktordner des Benutzers erstellen.You can also create a new contactFolder under the user's default contact folder.
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) | Contacts.ReadWriteContacts.ReadWrite |
Delegiert (persönliches Microsoft-Konto)Delegated (personal Microsoft account) | Contacts.ReadWriteContacts.ReadWrite |
AnwendungApplication | Contacts.ReadWriteContacts.ReadWrite |
HTTP-AnforderungHTTP request
POST /me/contactFolders/{id}/childFolders
POST /users/{id | userPrincipalName}/contactFolders/{id}/childFolders
AnforderungsheaderRequest headers
KopfzeileHeader | WertValue |
---|---|
AuthorizationAuthorization | Bearer {token}. Erforderlich.Bearer {token}. Required. |
Content-TypeContent-Type | application/json. Erforderlich. application/json. Required. |
AnforderungstextRequest body
Geben Sie im Anforderungstext eine JSON-Darstellung des ContactFolder-Objekts an.In the request body, supply a JSON representation of ContactFolder object.
AntwortResponse
Wenn die Methode erfolgreich verläuft, werden der Antwortcode 201 Created
und das ContactFolder-Objekt im Antworttext zurückgegeben.If successful, this method returns 201 Created
response code and ContactFolder object in the response body.
BeispielExample
AnforderungRequest
Nachfolgend sehen Sie ein Beispiel der Anforderung.Here is an example of the request.
POST https://graph.microsoft.com/v1.0/me/contactFolders/{id}/childFolders
Content-type: application/json
Content-length: 84
{
"displayName": "displayName-value"
}
Geben Sie im Anforderungstext eine JSON-Darstellung des contactFolder-Objekts an.In the request body, supply a JSON representation of contactFolder object.
AntwortResponse
Nachfolgend sehen Sie ein Beispiel der Antwort. Hinweis: Das hier gezeigte Antwortobjekt ist möglicherweise aus Platzgründen abgeschnitten. Von einem tatsächlichen Aufruf werden alle Eigenschaften zurückgegeben.Here is an example of the response. Note: The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
HTTP/1.1 200 OK
Content-type: application/json
Content-length: 104
{
"parentFolderId": "parentFolderId-value",
"displayName": "displayName-value",
"id": "id-value"
}