Skip to content

Instantly share code, notes, and snippets.

@expiscornovus
Created March 23, 2025 10:55
Show Gist options
  • Save expiscornovus/c42d7a7e5f337aef175e98852c6740b0 to your computer and use it in GitHub Desktop.
Save expiscornovus/c42d7a7e5f337aef175e98852c6740b0 to your computer and use it in GitHub Desktop.
Body Add YouTube Embed Web Part on Page
{
"@odata.type": "#microsoft.graph.sitePage",
"title": "Call to Action Example",
"canvasLayout": {
"horizontalSections": [
{
"layout": "oneColumn",
"id": "1",
"emphasis": "none",
"columns": [
{
"id": "1",
"webparts": [
{
"id": "f1ffe693-d741-4fb4-8713-71f48f7b80a9",
"webPartType": "544dd15b-cf3c-441b-96da-004d5a8cea1d",
"data": {
"dataVersion": "1.2",
"title": "YouTube",
"description": "Show a YouTube video on the page.",
"properties": {
"embedCode": "https://youtu.be/nn4dX09z3Yw?si=adqkLamuU6shTYPo",
"shouldScaleWidth": true,
"cachedEmbedCode": "<iframe width=200 height=113 src=https://www.youtube.com/embed/nn4dX09z3Yw?feature=oembed frameborder=0 allowfullscreen> </iframe>",
"runtimeState": {
"@odata.type": "#graph.Json",
"isPrivate": false,
"showControls": true,
"startTime": "00:10"
}
},
"serverProcessedContent": {
"htmlStrings": [],
"searchablePlainTexts": [
{
"key": "title",
"value": "YouTube Example"
},
{
"key": "captionText",
"value": "YouTube embedded via from my Channel"
}
],
"links": [],
"imageSources": []
}
}
}
]
}
]
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment