Quantcast
Channel: Azure フォーラム
Viewing all articles
Browse latest Browse all 1798

Graph APIでWord、PowerPoint、Excelのファイルを新規作成したい

$
0
0
msal.jsを利用してjavascriptのクライアントからWord、PowerPoint、Excelファイルを新規作成(POST)してみたのですが、
作成したファイルをTeamsのWebクライアントで表示したところ「このファイルには、表示できるプレビューがありません。」と表示されます。
デスクトップのOfficeクライアントでファイルを新規作成するのと同様のプロセスをGraphAPIで適切に行う方法はありますでしょうか。

■詳細
・エンドポイント:https://graph.microsoft.com/v1.0/groups/${groupId}/drive/items/${parentItemId}/children
・POSTのリクエストBody:
const json =
{
 "name": "test.docx",
 "file": {
 "mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
 },
 "@microsoft.graph.conflictBehavior": "rename"
};
※PowerPointの場合はname="test.pptx"、mimeType="application/vnd.openxmlformats-officedocument.presentationml.presentation"



Viewing all articles
Browse latest Browse all 1798

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>