Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

Questions tagged [graph-api]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
23 views

How Do I Add a Menu Item to a Popup Menu in a SharePoint List

I have a requirement to add a menu item that will process an email URL and paste it into the column of a column in a list. In the screen shot below, you can see a popup menu appears when I click the ...
Mike Malter's user avatar
0 votes
0 answers
15 views

Graph Search Query by SiteId

I am trying to do a graph search query that bring the last 20 items updated from a specific site ordered by the lastModifiedDateTime, and if possible also filtered by a custom field that they should ...
rread's user avatar
  • 11
0 votes
1 answer
14 views

What would be my tenant URL and where in the admin center I need to consent access requested?

I have following ShareGate PowerShell script. I need to connect to tenant URL. Is that portal.office.com? Also which admin center I need to connect to grant ShareGate Graph API access? # Connect to ...
maria's user avatar
  • 1
1 vote
1 answer
123 views

Cannot change the "Created By" column in a SharePoint list item using Graph API

I'm trying to programmatically change the "Created By" -field of a list item in a SharePoint list. As a development tool, I'm using the Microsoft Graph API python library - msgraph-sdk for ...
Jussi Hietanen's user avatar
0 votes
1 answer
31 views

How to obtain permissions, via MS Graph API, for a Communication Sites & its pages?

I have a Communications Site with pages, and I am trying to understand if I can obtain the Sharepoint identities via the MS Graph API. My understanding is that a Communication Site is not represented ...
Bartek's user avatar
  • 101
0 votes
0 answers
78 views

How to request HTML of whole page via SharePoint GraphAPI? (not only WebParts)

I'm trying to display SharePoint pages on a webpage through SharePoint GraphAPI. I used WebPart endpoint to get HTML content of SharePoint page (https://learn.microsoft.com/en-us/graph/api/resources/...
David Holada's user avatar
0 votes
0 answers
75 views

Intermittent Unauthorized Additional claims required errors when calling /user/chats endpoint

I am experiencing intermittent errors when querying the graph api endpoint for teams chat. I am using powershell and delegated access. Here is a code snippet: $tenantId = "my_tenant_id" $...
Andrew Gaskell's user avatar
0 votes
0 answers
92 views

Documents are always locked in SharePoint

I am trying to use Graph API to check if a document is locked or not. There does not seem to be any special method in the Graph API to check for file locks so I am trying to come up with my own. This ...
Sigmundur's user avatar
  • 115
0 votes
1 answer
90 views

Creating 365 group with Graph API adds "Everyone except external users" to the members site permissions

I am creating a 365 Group using the Graph API version 5.X and when I check the Site Permissions for the Group then I can see a "Everyone except external users" there. I do not want this to ...
Sigmundur's user avatar
  • 115
0 votes
1 answer
392 views

Check If Site URL is SharePoint Site or Team Channel Site

Is it possible to check if a site URL belongs to a SharePoint site or Teams channel site using Graph API?
Devashish Pawar's user avatar
0 votes
0 answers
166 views

MS graph - List all the subsites in multi geo tenant via API

I am trying to list down all the sites in the multi geo tenant. I can able to list down only NAM PDL records via Graph API. I can't able to list down other PDL sites. I tried following endpoints and ...
Samraj's user avatar
  • 11
1 vote
1 answer
99 views

While I fetch site pages(.aspx) on sub sites using graph.microsoft.com/beta/sites/{subsite-id}/page it returns empty value

I have a question: Why get site pages(.aspx) on sub sites using graph.microsoft.com/beta/sites/{subsite-id}/page return value is empty, While I used with graph.microsoft.com/beta/sites/{site-id} can ...
Hàn Vũ's user avatar
0 votes
0 answers
85 views

In a Delta query, CreatedBy is sometimes null and sometimes not null but missing User property

I am tracking changes to files and folders using delta query with Graph API version 5.12 (not beta). In order to reflect the changes in our system we rely on the CreatedBy property. The problem is ...
Sigmundur's user avatar
  • 115
0 votes
0 answers
35 views

Fetch Document Library Asset Changes from SharePoint

I want to fetch events from SharePoint which can indicate file changes in document library after given timestamp. When i say Changes, I mean All Created/New Files Updated files Deleted files and ...
Dhruvin's user avatar
  • 13
0 votes
0 answers
170 views

Access denied when trying to create folder using Microsoft Graph API

I am new to Microsoft Graph API, and today when I was trying to create a test file in my SP test site, I got the attached error message. I am using SharePoint admin account. I did try to go to Modify ...
Harris's user avatar
  • 595
0 votes
0 answers
109 views

Sharepoint API folder search endpoint & query not working

I'm building an integration with Sharepoint via Make (formerly Integromat). The native Make module for searching sharepoint does not identify the folder & returns no results. I have to enter a ...
Jaco's user avatar
  • 1
0 votes
1 answer
579 views

Unable to expand ListItem for a drive item when using Delta Query

I am trying to access a custom column in SharePoint using the graph APIs delta query. I am using /sites/{siteId}/drive/{driveId}/delta?expand=listItem&token=deltaToken but I am not getting the ...
Devashish Pawar's user avatar
0 votes
1 answer
965 views

Verify the existence of a folder in SharePoint using the Graph API

To check whether a specific path of a folder (e.g. /Shared Documents/foo/bar) exists in SharePoint, which endpoint of the Graph API can you use? If I use '/search' with the word, 'bar', /Shared ...
pickmin's user avatar
0 votes
1 answer
1k views

Update field (metadata) on a file with graph api version 5.9

I am trying to update metadata on a file that I have uploaded using Graph API version 5.9 in C#. I am trying to use the sample I found here: Update Item but it does not seem to work for me. I am ...
Sigmundur's user avatar
  • 115
0 votes
1 answer
584 views

Updating from Graph 4.21 to 5.9 makes the calls from ASP projects hang but not from console projects

I have made two projects using Microsoft.Graph and it started out in version 4.21 and was working great. Then I decided to upgrade to the newest version which is 5.9 and now suddenly the web service ...
Sigmundur's user avatar
  • 115
0 votes
0 answers
65 views

How to get recent opened and shared document in spfx

I am trying below code but getting error https://xxxxxxx.sharepoint.com/sites/xxxxxxx/15/v1.0/me/drive/sharedWithMe 404 (Not Found) private _getFilesSharedWithMe(): Promise<any> { ...
Ashok 's user avatar
  • 59
0 votes
1 answer
36 views

Does SharePoint actions such as "GetItem", "GetItems", "Grant access to an Item or folder" , etc uses SharePoint api or Graph API

I have a question if SharePoint actions such as "GetItem", "GetItems", "Grant access to an Item or folder", etc uses SharePoint API or Graph API?
microsoftdeveloperdesigner's user avatar
0 votes
1 answer
475 views

Is it possible to get the Members group of a specific site in SharePoint using the Graph API and then add or remove a member?

I am trying to manipulate the members of a site in SharePoint using Graph API. I want to be able to get the members group of a specific Site using the site id. Then I want to be able to add/remove ...
Sigmundur's user avatar
  • 115
0 votes
1 answer
817 views

CSOM vs PnP Core SDK vs Graph API, which approach is more future proof

We want to start a new project which include creating an azure function (using .net 6.0) that runs on timely basis to create folder structure as follow:- we have a SharePoint custom list which allows ...
John John's user avatar
0 votes
1 answer
647 views

SPHttpClients vs AadHttpClient vs MsGrpahclient

When developing SPFx we are left with many technologies to be used. mainly i am trying to understand when to use each SPHttpClients vs AadHttpClient vs MsGrpahclient now i know the SPHttpClient can ...
John John's user avatar
0 votes
1 answer
271 views

How to read "department" with MSGraph?

I'm working on a new Webpart with SPFx and I need only the "department" from every Employee. I have found Code examples, bot no one works at me. import { MSGraphClientV3 } from '@microsoft/...
LeberkäseWhatsappgruppe's user avatar
1 vote
0 answers
1k views

Unable to post message on Teams using Microsoft Graph API

I am trying to post message on a teams channel but I am not able to do that. I have got the required permissions also - Teamwork.Migrate.All. The following code snippet is being used: import requests ...
Kompal's user avatar
  • 21
1 vote
1 answer
1k views

Getting -"Either scp or roles claim need to be present in the token" and Access Denied while using Graph API to upload files to SharePoint

Initially when I tried to generate the token using the URL - https://login.microsoftonline.com/tenant-id/oauth2/v2.0/token I was able to fetch the Bearer token using grant_type, client_id, scope and ...
Kompal's user avatar
  • 21
3 votes
1 answer
1k views

Unable to resolve "@pnp/graph"' has no exported member named 'graph' in SPFX solution

I have an SPFX solution where I am trying to use Graph API. I tried installing 'npm install @pnp/logging @pnp/core @pnp/queryable @pnp/graph --save' Now, while using 'import { graph } from "@pnp/...
Kailash Sahoo's user avatar
0 votes
0 answers
211 views

MGT PeoplePicker selectionChanged event parameter type

I am creating a SPFx web part and I am using the Microsoft Graph Toolkit PeoplePicker. It offers a selectionChanged callback. This callback gets passed a parameter of type Event (defined in typescript/...
mario.b's user avatar
0 votes
1 answer
404 views

Capture the users clicks inside our SharePoint modern home page (how click on quick link modern news, etc..)

We have a SharePoint online modern page which contains, those main Web Parts:- Quick links News web part now we want to capture the users clicks and store them inside a SharePoint online list to ...
John John's user avatar
2 votes
2 answers
1k views

How to connect SharePoint online list to insert data from out side the SharePoint platform using

We have a requirement to push data from the external application into the SharePoint online list. Please guide me on the steps and specifically the how the authentication should happen from external ...
Kailash Sahoo's user avatar
0 votes
2 answers
506 views

Accessing a SharePoint list without access using Graph API in SPFx

I am trying to show SharePoint list items from a different site collection in a SharePoint adaptive card extension using Graph API. This is working as expected for any user who has access to the ...
Mahesh KP's user avatar
  • 131
1 vote
0 answers
128 views

Graph API only returns one out of several followed Sites

I tried accessing the followed sites for a Sharepoint using an HTTP Request, but it returns only one out of six pages I currently follow. https://graph.microsoft.com/v1.0/me/followedSites The one ...
Communicator_XoX's user avatar
0 votes
1 answer
1k views

Graph API call from SPFX tab with MS Graph Client

Can we call Graph API directly through MS Graph Client for SPFX tab in team Desktop?? Here is the sample of git which call Graph API directly in teams tab without any authentication flow or access ...
abhishek23 Negi's user avatar
0 votes
1 answer
477 views

Followed sites graph api not working

For our project we are using the /me/followedSites graph API (https://docs.microsoft.com/en-us/graph/api/sites-list-followed?view=graph-rest-1.0&tabs=http) for fetching the followed sites data but ...
anantharengan's user avatar
0 votes
1 answer
2k views

Post Team Chat Messages using Graph API

Not able to post message in teams chat using Graph API in SPFX using Token but able to get chats by using token Getting error in console Requested API is not supported in application-only context ...
abhishek23 Negi's user avatar
0 votes
1 answer
1k views

Programmatically retrieving Document ID

I have a SharePoint Online site collection with Document ID service enabled, so that every document uploaded to a document library in the site has a unique document identifier. All the documents will ...
Tanmoy Sengupta's user avatar
0 votes
2 answers
1k views

Fetching the items from a list with types

I have a list with items like this one: I'm fetching the data with graph https://graph.microsoft.com/v1.0/sites/{{tenant}}:/sites/{{siteName}}:/lists/{{listName}}/items?expand=fields. This is a chunk ...
Javier Molinas Vilas's user avatar
0 votes
1 answer
348 views

Graph API unauthorized error for specific user only

All the permission are given , this API is working fine for other users Below is the screenshot of Graph explorer calling this API and getting unauthorized error This API was working fine but after ...
abhishek23 Negi's user avatar
1 vote
4 answers
796 views

Change a site address (URL) by HTTP Request

I want to change the URL of a modern team site (without group, STS#3) by HTTP Request. Which API request do I need to do? I already tried by using GRAPH API but it only updates the displayName and not ...
user101830's user avatar
1 vote
0 answers
547 views

403(Forbidden) Invalid permission error in my SPFx web part when trying to access SharePointSiteUsageDetail with MSGraph

I can GET data in Graph Explorer,but when I try in my SPFx solution it gives me an 403(Forbidden) error: https://graph.microsoft.com/beta/reports/getSharePointSiteUsageDetail(period='D30')?$format=...
YASi's user avatar
  • 25
0 votes
1 answer
3k views

How to find the page views in the SharePoint?

How to find the page views in the SharePoint? Here in the attachment the count is 1030. How to get for all the pages in the SharePoint site with API.
user101276's user avatar
0 votes
0 answers
582 views

Java Code: SharePoint Graph API CompactToken parsing failed with error code: 80049217

SharePoint Graph API to generate an Access token. URL to generate access token: https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/token URL to download a file from SharePoint: https://graph....
Thomson Ignesious's user avatar
0 votes
1 answer
949 views

Creating Pages and adding webpart to sections of page (SharePoint Online)

When a List Item is created, I wish to automate the provisioning of a SharePoint Site and add pages with webparts to sections of the page (webparts pre-loaded onto tenant). Because Modern Sites do not ...
Orange Juice Jones's user avatar
0 votes
1 answer
218 views

IS there any way to create tasks in particular Channel of teams using Microsoft Graph API

I want to create a spfx webpart to create a tasks in the teams channel IS there any API for creating tasks in teams channel Below is the image of my channel Task tab I am new to Graph API Thanks in ...
abhishek23 Negi's user avatar
0 votes
1 answer
586 views

Site Sharing settings with PowerShell, PnP PowerShell or Graph API

I'm looking for a solution to access the following setting with PowerShell, PnP PowerShell or Graph API. I can't find any option to do that. I found the option to disable it, but not to restrict it. ...
Apex5296's user avatar
0 votes
2 answers
2k views

Upload File with Required Property to SharePoint Online using Graph API (C#)

To help us move from legacy SharePoint to SharePoint Online, we have created an Azure App and written the code in C# to allow users to upload and download files using Active Directory authentication. ...
MartinS's user avatar
1 vote
1 answer
2k views

Adding custom column to a SharePoint library using Graph API

I want to be able to add a custom column to a SharePoint library using Graph API. I was able to create the library using article https://docs.microsoft.com/en-us/graph/api/list-create?view=graph-rest-...
Abhishek's user avatar
0 votes
1 answer
140 views

Recent Documents" Web Parts on Classic Page

I would like users to view the most recent documents. I know this web part is part of the communication site for modern sites. Can I replicate the same in a classic page? Looking for some ideas/...
naijacoder's user avatar
  • 4,282