| title | Create userConfiguration |
|---|---|
| description | Create a new userConfiguration object. |
| author | daiyue-microsoft |
| ms.date | 11/06/2025 |
| ms.localizationpriority | medium |
| ms.subservice | outlook |
| doc_type | apiPageType |
Namespace: microsoft.graph
[!INCLUDE beta-disclaimer]
Create a new userConfiguration object.
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.
[!INCLUDE permissions-table]
POST /me/mailFolders/{mailFolderId}/userConfigurations
POST /users/{usersId}/mailFolders/{mailFolderId}/userConfigurations| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
| Content-Type | application/json. Required. |
In the request body, supply a JSON representation of the userConfiguration object.
You can specify the following properties when you create a userConfiguration.
| Property | Type | Description |
|---|---|---|
| binaryData | Binary | Arbitrary binary data. Optional. |
| id | String | The unique key. |
| structuredData | structuredDataEntry collection | Key-value pairs of supported data types. Optional. |
| xmlData | Binary | Binary data for storing serialized XML. Optional. |
If successful, this method returns a 201 Created response code and a userConfiguration object in the response body.
The following example shows a request.
POST https://graph.microsoft.com/beta/me/mailFolders/inbox/userConfigurations
Content-Type: application/json
{
"id": "MyApp",
"binaryData": "SGVsbG8=",
"xmlData": "V29ybGQ=",
"structuredData": [
{
"keyEntry": {
"type": "byte",
"values": [
"100"
]
},
"valueEntry": {
"type": "boolean",
"values": [
"true"
]
}
},
{
"keyEntry": {
"type": "integer32",
"values": [
"-32"
]
},
"valueEntry": {
"type": "integer64",
"values": [
"64"
]
}
},
{
"keyEntry": {
"type": "unsignedInteger32",
"values": [
"32"
]
},
"valueEntry": {
"type": "unsignedInteger64",
"values": [
"64"
]
}
},
{
"keyEntry": {
"type": "string",
"values": [
"DateTime"
]
},
"valueEntry": {
"type": "dateTime",
"values": [
"2025-10-23T01:23:45.0000000+00:00"
]
}
},
{
"keyEntry": {
"type": "byteArray",
"values": [
"AQECAwUI"
]
},
"valueEntry": {
"type": "stringArray",
"values": [
"Hello",
"World"
]
}
}
]
}[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 201 Created
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#users('f42c50f8-1300-48a0-93d4-6481acda7efb')/mailFolders('inbox')/userConfigurations/$entity",
"id": "MyApp",
"binaryData": "SGVsbG8=",
"xmlData": "V29ybGQ=",
"structuredData": [
{
"keyEntry": {
"type": "byte",
"values": [
"100"
]
},
"valueEntry": {
"type": "boolean",
"values": [
"true"
]
}
},
{
"keyEntry": {
"type": "integer32",
"values": [
"-32"
]
},
"valueEntry": {
"type": "integer64",
"values": [
"64"
]
}
},
{
"keyEntry": {
"type": "unsignedInteger32",
"values": [
"32"
]
},
"valueEntry": {
"type": "unsignedInteger64",
"values": [
"64"
]
}
},
{
"keyEntry": {
"type": "string",
"values": [
"DateTime"
]
},
"valueEntry": {
"type": "dateTime",
"values": [
"2025-10-23T01:23:45.0000000+00:00"
]
}
},
{
"keyEntry": {
"type": "byteArray",
"values": [
"AQECAwUI"
]
},
"valueEntry": {
"type": "stringArray",
"values": [
"Hello",
"World"
]
}
}
]
}