403 Forbidden Error while creating ExternalItem for Schema, after Creating Connector

Priyanshu Pathak 0 Reputation points
2025-01-24T09:39:50.38+00:00
  • I have created a connector using postman with a POST request at: https://graph.microsoft.com/v1.0/external/connections
  • I have also created a schema with a POST request at: https://graph.microsoft.com/v1.0/external/connections/{connector-id}/schema The body is as following:
      
      {
          "baseType": "microsoft.graph.externalItem",
          "properties": [
              {
                  "name": "name",
                  "type": "String",
                  "isSearchable": true,
                  "isQueryable": true,
                  "isRetrievable": true
              },
              {
                  "name": "urlLink",
                  "type": "String",
                  "isSearchable": false,
                  "isQueryable": true,
                  "isRetrievable": true
              }
          ]
      }
    
  • Now I am trying to ingest data with a PUT request at: https://graph.microsoft.com/v1.0/external/connections/{connector-id}/items/myitem
    The body is as following, also note that I have tried different body parameters, all attached:
      // first try
      {
          "acl": [
              {
                  "type": "user", // also tried with everyone
                  "value": "client-id",
                  "accessType": "grant"
              }
          ],
          "id": "same as url",
          "properties": {
              "title": "mytitle",
              "url": "my url",
          },
          "content": {
              "type": "text",
              "value": "This is a sample external item content."
          }
      }
      
    
    

  // second try  
{
 
      "id": "same as url",
      "properties": {
          "title": "mytitle"
          "url": "myurl"
      },
      "content": {
          "type": "text",
          "value": "This is a sample external item content."
      }
  }

// third try, without passing the id

But I am facing 403 Forbidden Error.
My aim is to index my site via MS Connector, which I will use in Copilot Studio as an external connector.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,993 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Saranya Madhu-MSFT 1,425 Reputation points Microsoft Vendor
    2025-01-27T07:59:26.4033333+00:00

    Hi Priyanshu Pathak,

    Thanks for reaching out to Microsoft!

    As per document, 403 Forbidden error occurs when the access is denied to the requested resource. The user might not have enough permission or might not have a required license.

    Decode the Token by using jwt.io, scp (scope) or roles: Should include the permissions your app needs, like ExternalItem.ReadWrite.All.User's image

    For creating externalItem ,id,properties,acl are the required.

    Make sure to pass the valid id, value, type.

    Known limitations

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.