Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Microsoft Graph の SharePoint pages API について

Microsoft Graph の SharePoint pages API について

MiyakeMito

April 01, 2023
Tweet

More Decks by MiyakeMito

Other Decks in Technology

Transcript

  1. 本日の参考サイト 4 ◼ sitePage リソースの種類(Microsoft Learn) https://learn.microsoft.com/ja- jp/graph/api/resources/sitepage?view=graph-rest- beta#pagelayouttype-values ◼

    Microsoft Graph Pages API: Power Apps (+Power Automate) から SharePoint ページを作成しよう(平野愛 さん) https://shanqiai.lekumo.biz/sharepoint_technical_note/2022/12/ power-apps-shar-2830.html
  2. Microsoft Graph の 新しい SharePoint pages API の発表 https://devblogs.microsoft.com/microsoft365dev/announcing- the-new-sharepoint-pages-api-in-microsoft-graph/

    1. SharePoint モダン ページ テクノロジの最新の開発に沿った新し いデータ モデル ➢ 水平/垂直セクション ➢ Webパーツ 2. 以前のbeta API と比較して改善されたページ管理機能 6
  3. 4月までにGAされる SharePoint Pages API ◼ 任意のサイトのすべてのページとニュース投 稿のリストを取得します。 ◼ 任意のページまたはニュース投稿のコンテン ツを取得します。

    ◼ ページまたはニュース投稿を作成する ◼ ページまたはニュース投稿を公開する ◼ ページまたはニュース投稿を削除する 7
  4. Graph API 実行 10 1. アプリの許可で実行 Create a page in

    the site pages list of a site https://learn.microsoft.com/en-us/graph/api/sitepage-create?view=graph-rest-beta#permissions 2. 委任されたアクセス許可で実行
  5. Graph API を Power Automate で利用する 11 ◼ Microsoft Graph

    API について https://speakerdeck.com/miyakemito/graph-api-nituite ◼ Power Automate で Graph API 実行が無料 https://speakerdeck.com/miyakemito/powerautomatedegr aphapigawu-chang-kamo https://speakerdeck.com/miyakemito
  6. webPart resource type ◼ 実際に作成したサイトページから、Web Partリソースを取得するのが オススメです 12 GET /sites/{sitesId}/pages/{sitePageI

    d}/webparts GET /sites/{sitesId}/pages/{sitePageI d}/canvasLayout/horizontalSecti ons/{horizontalSectionId}/colum ns/{horizontalSectionColumnId}/ webparts GET /sites/{sitesId}/pages/{sitePageI d}/canvasLayout/verticalSection/ webparts "properties": { "isMigrated": true, "layoutId": "Button", "shouldShowThumbnail": true, "imageWidth": 100, "hideWebPartWhenEmpty": true, "dataProviderId": "QuickLinks", "webId": "f07ee155-cdb5-45a3-8d51-1a0e278440ae", "siteId": "1f9a9f96-b55c-4ce1-bc84-a3c14b7b27be", "imagePicker": "/sites/TeamSite/SiteAssets/SitePages/Sample/画像1.png", "[email protected]": "#Collection(graph.Json)", "items": [ { "thumbnailType": 1, "id": 3, "description": "", "altText": "", "rawPreviewImageMinCanvasWidth": 32767, "sourceItem": { "@odata.type": "#graph.Json", "itemType": 2, "fileExtension": "", "progId": "" }, "image": { "@odata.type": "#graph.Json", "imageFit": 2, "minCanvasWidth": 1, "guids": { "@odata.type": "#graph.Json", "listId": "1d778c11-6259-44c3-98c1-fcdcd4db66f3", "uniqueId": "024c1110-d336-44de-972e-8494bdb87b87", "webId": "f07ee155-cdb5-45a3-8d51-1a0e278440ae", "siteId": "1f9a9f96-b55c-4ce1-bc84-a3c14b7b27be" } } } サイトページ Graph Pages/webparts API webpart の JSON Schema