この記事では、宣言型エージェント マニフェストの capabilities セクションに Copilot コネクタと SharePoint/OneDrive ファイルを含めるために必要な ID を取得する方法について説明します。
Microsoft Graph エクスプローラーまたは Microsoft Graph PowerShell を使用できます。
Copilot コネクタ
このセクションでは、マニフェスト内の Copilot コネクタ オブジェクトの Connection オブジェクトの connection_id プロパティで設定する値を取得する方法について説明します。
重要
Copilot コネクタのクエリには、管理者アカウントが必要です。
Microsoft Graph エクスプローラーを参照し、管理者アカウントでサインインします。
右上隅にあるユーザー アバターを選択し、[ アクセス許可への同意] を選択します。
ExternalConnection.Read.Allを検索し、そのアクセス許可に対する [同意] を選択します。 プロンプトに従って同意を付与します。
要求フィールドに
https://graph.microsoft.com/v1.0/external/connections?$select=id,nameを入力し、[ クエリの実行] を選択します。
目的のコネクタを見つけて、その
idプロパティをコピーします。 たとえば、次の応答で GitHub Repos コネクタを使用するには、githubrepos値をコピーします。{ "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#connections(id,name)", "value": [ { "id": "applianceparts", "name": "Appliance Parts Inventory" }, { "id": "githubrepos", "name": "GitHub Repos" } ] }
SharePoint ID の取得
このセクションでは、OneDriveAndSharePoint オブジェクトの items_by_sharepoint_ids プロパティ内で次のプロパティで設定する値を取得する方法について説明します。
site_idlist_idweb_idunique_id
Microsoft Graph エクスプローラーを参照し、管理者アカウントでサインインします。
右上隅にあるユーザー アバターを選択し、[ アクセス許可への同意] を選択します。
Sites.Read.Allを検索し、そのアクセス許可に対する [同意] を選択します。 プロンプトに従って同意を付与します。 このプロセスをFiles.Read.Allに対して繰り返します。
方法のドロップダウンを [POST] に変更し、[要求] フィールドに「
https://graph.microsoft.com/v1.0/search/query」と入力します。
要求本文に、
https://yoursharepointsite.com/sites/YourSite/Shared%20Documents/YourFile.docxを、ID を取得するファイルまたはフォルダーの URL に置き換えて、以下を追加します。{ "requests": [ { "entityTypes": [ "driveItem" ], "query": { "queryString": "Path:\"https://yoursharepointsite.com/sites/YourSite/Shared%20Documents/YourFile.docx\"" }, "fields": [ "fileName", "listId", "webId", "siteId", "uniqueId" ] } ] }[クエリの実行] を選択します。
目的のファイルを見つけて、その
listId、webId、siteId、およびuniqueIdのプロパティをコピーします。{ "value": [ { "searchTerms": [], "hitsContainers": [ { "hits": [ { "hitId": "01AJOINAHZHINTBHPESZBISPIPSJG3D5EO", "rank": 1, "summary": "Reorder policy Our reorder policy for suppliers is straightforward and designed to maintain cost-efficiency and inventory control. We kindly request that no order exceeds a total", "resource": { "@odata.type": "#microsoft.graph.driveItem", "listItem": { "@odata.type": "#microsoft.graph.listItem", "id": "301b3af9-e49d-4296-893d-0f924db1f48e", "fields": { "fileName": "YourFile.docx", "listId": "12fde922-4fab-4238-8227-521829cd1099", "webId": "a25fab47-f3b9-4fa3-8ed9-1acb83c12a4f", "siteId": "5863dfa5-b39d-4cd1-92a6-5cf539e04971", "uniqueId": "{301b3af9-e49d-4296-893d-0f924db1f48e}" } } } } ], "total": 1, "moreResultsAvailable": false } ] } ] }