Retrieving capabilities IDs for declarative agent manifest
This article describes methods for developers to retrieve the necessary IDs to include Graph connectors and SharePoint/OneDrive files within the capabilities
section of their declarative agent manifest. Developers can use Microsoft Graph Explorer or Microsoft Graph PowerShell.
Microsoft Graph connectors
This section describes how developers can retrieve the value to set in the connection_id
property of the Connection object in the Microsoft Graph connectors object in the manifest.
Important
Querying for Microsoft Graph connectors requires an admin account.
Browse to Microsoft Graph Explorer and sign in with your admin account.
Select your user avatar in the upper right corner and select Consent to permissions.
Search for
ExternalConnection.Read.All
and select Consent for that permission. Follow the prompts to grant consent.Enter
https://graph.microsoft.com/v1.0/external/connections?$select=id,name
in the request field and select Run query.Locate the connector you want and copy its
id
property. For example, to use the GitHub Repos connector in the following response, copy thegithubrepos
value.{ "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#connections(id,name)", "value": [ { "id": "applianceparts", "name": "Appliance Parts Inventory" }, { "id": "githubrepos", "name": "GitHub Repos" } ] }
Retrieving SharePoint IDs
This section describes how developers can retrieve the value to set in the following properties within the items_by_sharepoint_ids
property of the OneDriveAndSharePoint
object:
site_id
list_id
web_id
unique_id
Browse to Microsoft Graph Explorer and sign in with your admin account.
Select your user avatar in the upper right corner and select Consent to permissions.
Search for
Sites.Read.All
and select Consent for that permission. Follow the prompts to grant consent. Repeat this process forFiles.Read.All
.Change the method dropdown to POST and enter
https://graph.microsoft.com/v1.0/search/query
in the request field.Add the following in the Request body, replacing
https://yoursharepointsite.com/sites/YourSite/Shared%20Documents/YourFile.docx
with the URL to the file or folder you want to get IDs for.{ "requests": [ { "entityTypes": [ "driveItem" ], "query": { "queryString": "Path:\"https://yoursharepointsite.com/sites/YourSite/Shared%20Documents/YourFile.docx\"" }, "fields": [ "fileName", "listId", "webId", "siteId", "uniqueId" ] } ] }
Select Run query.
Locate the file you want and copy its
listId
,webId
,siteId
, anduniqueId
properties.{ "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 } ] } ] }