spo contenttype sync
Adds a published content type from the content type hub to a site or syncs its latest changes.
Usage
m365 spo contenttype sync [options]
Options
-u, --webUrl <webUrl>
The site to sync the Content Type to.
-i, --id [id]
The Id of the published Content Type to sync from the Content Type Hub. Specify either
id
orname
.-n, --name [name]
The name of the published Content Type to sync from the Content Type Hub. Specify either
id
orname
.--listTitle [listTitle]
Title of the list. Specify either
listTitle
,listId
orlistUrl
. Omit to sync as a site content type.--listId [listId]
ID of the list. Specify either
listTitle
,listId
orlistUrl
. Omit to sync as a site content type.--listUrl [listUrl]
Server- or site-relative URL of the list. Specify either
listTitle
,listId
orlistUrl
. Omit to sync as a site content type.
-h, --help [help]
Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options
,examples
,remarks
,response
,full
. Default isoptions
.--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]
Output type.
json
,text
,csv
,md
,none
. Defaultjson
.--verbose
Runs command with verbose logging.
--debug
Runs command with debug logging.
Examples
Syncs a given published content type from the hub to the specified site.
m365 spo contenttype sync —webUrl https://contoso.sharepoint.com/sites/sales --id 0x01007926A45D687BA842B947286090B8F67D
Syncs a given published content type from the hub to the specified site and adds it to the specified list.
m365 spo contenttype sync —webUrl https://contoso.sharepoint.com/sites/sales --id 0x01007926A45D687BA842B947286090B8F67D --listTitle Contacts
Response
This command will only return a response if the content type is added to the site initially. When syncing the content type, no response is returned.
- JSON
- Text
- CSV
- Markdown
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#contentType",
"@odata.type": "#microsoft.graph.contentType",
"@odata.etag": "\"2\"",
"id": "0x0101003D510887202C894AB7CD88CCE011519D",
"isBuiltIn": false,
"description": "",
"group": "Custom Content Types",
"hidden": false,
"name": "Dummy",
"parentId": "0x0101",
"readOnly": true,
"sealed": false,
"base": {
"id": "0x0101",
"description": "Create a new document.",
"group": "Document Content Types",
"hidden": false,
"name": "Document",
"readOnly": false,
"sealed": false
}
}
@odata.context: https://graph.microsoft.com/v1.0/$metadata#contentType
@odata.etag : "2"
@odata.type : #microsoft.graph.contentType
base : {"id":"0x0101","description":"Create a new document.","group":"Document Content Types","hidden":false,"name":"Document","readOnly":false,"sealed":false}
description :
group : Custom Content Types
hidden : false
id : 0x01010004448644DB17414A9F1174B4FBFD9AC1
isBuiltIn : false
name : Dummy
parentId : 0x0101
readOnly : true
sealed : false
@odata.context,@odata.type,@odata.etag,id,isBuiltIn,description,group,hidden,name,parentId,readOnly,sealed
https://graph.microsoft.com/v1.0/$metadata#contentType,#microsoft.graph.contentType,"""2""",0x010100F4ACBE99F2DBDE42B0487A561A40F9EE,,,Custom Content Types,,Dummy,0x0101,1,
# spo contenttype sync --webUrl "https://contoso.sharepoint.com/sites/project-x" --name "Dummy"
Date: 13/03/2024
## Dummy (0x010100F4ACBE99F2DBDE42B0487A561A40F9EE)
Property | Value
---------|-------
@odata.context | https://graph.microsoft.com/v1.0/$metadata#contentType
@odata.type | #microsoft.graph.contentType
@odata.etag | "2"
id | 0x010100F4ACBE99F2DBDE42B0487A561A40F9EE
isBuiltIn | false
description |
group | Custom Content Types
hidden | false
name | Dummy 5
parentId | 0x0101
readOnly | true
sealed | false