Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
Permission type
Least privileged permissions
Higher privileged permissions
Delegated (work or school account)
Contacts.ReadWrite
Not available.
Delegated (personal Microsoft account)
Contacts.ReadWrite
Not available.
Application
Contacts.ReadWrite
Not available.
HTTP request
POST /me/contactFolders/{id}/childFolders
POST /users/{id | userPrincipalName}/contactFolders/{id}/childFolders
POST https://graph.microsoft.com/v1.0/me/contactFolders/{id}/childFolders
Content-type: application/json
{
"displayName": "Family"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new ContactFolder
{
DisplayName = "Family",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Me.ContactFolders["{contactFolder-id}"].ChildFolders.PostAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc users contact-folders child-folders create --user-id {user-id} --contact-folder-id {contactFolder-id} --body '{\
"displayName": "Family"\
}\
'
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
ContactFolder contactFolder = new ContactFolder();
contactFolder.setDisplayName("Family");
ContactFolder result = graphClient.me().contactFolders().byContactFolderId("{contactFolder-id}").childFolders().post(contactFolder);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\ContactFolder;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ContactFolder();
$requestBody->setDisplayName('Family');
$result = $graphServiceClient->me()->contactFolders()->byContactFolderId('contactFolder-id')->childFolders()->post($requestBody)->wait();
Import-Module Microsoft.Graph.PersonalContacts
$params = @{
displayName = "Family"
}
# A UPN can also be used as -UserId.
New-MgUserContactFolderChildFolder -UserId $userId -ContactFolderId $contactFolderId -BodyParameter $params
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see: https://aka.ms/ContentUserFeedback.