Questions tagged [graph-api]
The graph-api tag has no usage guidance.
93
questions
0
votes
0
answers
15
views
How to update a SP list item using Graph API in Postman where the actual item will be filtered based on Title field instead of ID
I am trying to update a SP list item using Graph API using Postman. I am Patching through below API .
https://graph.microsoft.com/v1.0/sites/{{PO_ProdSite_ID}}/lists/0d9de749-9852-433c-9dgd-...
0
votes
0
answers
12
views
Accessing External Drive Content Linked in a SharePoint Online Modern Page Web Part Using Graph API
Is it possible to access content from a personal drive that has been linked in a SharePoint Online modern page web part using the Graph API? Specifically, I need to list the links to all files located ...
0
votes
0
answers
81
views
Graph API to filter by multi-choice person column (SharePoint)?
How to filter by a multi-choice person column's Email (SharePoint)?
I tried this format by referring to Graph filter method, and it's not working
&$filter=fields/RequestorDetails/any(x:x eq 'name2@...
0
votes
0
answers
31
views
Show a Plan as a Tab inside Teams Channel is no more working using Graph API, any advice?
I have this work flow which create a new Team Channel + create a new Planner Plan + show the Planner Plan as a tab inside the Team Channel. this was working well for around 6 months, but recently it ...
0
votes
0
answers
29
views
How to get news in SPFx-React through SharePoint online? Is it possible to show SharePoint online news web part in my SPFx-React in div section?
How to get news in SPFx-React through SharePoint online? Is it possible to show SharePoint online news web part in my SPFx-React in div section?
Current code:
<div className="lowercard"&...
0
votes
1
answer
29
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 ...
0
votes
0
answers
73
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 ...
0
votes
1
answer
75
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 ...
1
vote
1
answer
261
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 ...
0
votes
1
answer
138
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 ...
0
votes
0
answers
183
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/...
0
votes
0
answers
94
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"
$...
0
votes
0
answers
153
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 ...
0
votes
1
answer
143
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 ...
0
votes
1
answer
561
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?
1
vote
1
answer
121
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 ...
0
votes
1
answer
780
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 ...
0
votes
1
answer
1k
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 ...
0
votes
1
answer
2k
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 ...
0
votes
1
answer
735
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 ...
0
votes
0
answers
77
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> {
...
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?
0
votes
1
answer
595
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 ...
0
votes
1
answer
1k
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 ...
0
votes
1
answer
899
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 ...
0
votes
1
answer
381
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/...
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
...
1
vote
1
answer
2k
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 ...
4
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/...
0
votes
0
answers
241
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/...
0
votes
1
answer
459
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 ...
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 ...
0
votes
2
answers
579
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 ...
1
vote
0
answers
149
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 ...
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 ...
0
votes
1
answer
533
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 ...
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
...
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 ...
0
votes
2
answers
2k
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 ...
0
votes
1
answer
374
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 ...
1
vote
4
answers
908
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 ...
1
vote
0
answers
557
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=...
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.
0
votes
0
answers
586
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....
0
votes
1
answer
1k
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 ...
0
votes
1
answer
226
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 ...
0
votes
1
answer
638
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.
...
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. ...
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-...
0
votes
1
answer
149
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/...