Skip to main content

Questions tagged [microsoft-graph]

Questions that relate to the Microsoft Graph developer platform.

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

Display sharepoint file in iframe on custom website

I would like to use this https://docs.microsoft.com/en-us/graph/api/driveitem-createlink?view=graph-rest-1.0&tabs=http#creating-embeddable-links and display webHtml in my website. I'm trying ...
Iwoo's user avatar
  • 73
0 votes
0 answers
313 views

A provided field name ("_LikeCount"and "_CommentCount") is not recognized Graph Explorer

Hi i am trying to sort the result of my query by _LikeCount or _CommentCount of the Site Pages however i always got "A Provided field is not recognize" , any help is appreciated why it ...
BizApps's user avatar
  • 733
0 votes
1 answer
78 views

How to get notified when a new list or library has been created?

We need to react to new document libraries and/or lists being created in SharePoint sites. Is there a way to get notified when this happens? Graph change notifications currently only seem to exist for ...
Heinrich Ulbricht's user avatar
0 votes
1 answer
224 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
2 answers
142 views

https://graph.microsoft.com/v1.0/users returns a 403 Authorization_RequestDenied

I have an SPFX application deployed on SharePoint online that requires to get the users of a SharePoint site collection. To do that I used the PNP Graph library using the JavaScript command graph....
Hallemon's user avatar
1 vote
1 answer
2k views

Get all site collections listed in SharePoint Admin center using Rest / Search / Graph api

Does anyone know how to fetch all site collections from my SharePoint admin center by using rest api / search api / graph api? I have tired using search and graph api : let query = SearchQueryBuilder(&...
Paul's user avatar
  • 15
1 vote
1 answer
841 views

Is there a client API to manage user's alerts for document libraries/files?

In SharePoint users can use the "Alert me" function to get notified of file changes in a document library (or single files): Is there a client API to set those alerts? E.g. from a ...
Heinrich Ulbricht's user avatar
0 votes
1 answer
1k views

PnP Cmdlets / Provisioning: What are the minimal required permissions for basic SharePoint operations?

So far I mostly used PnP provisioning with interactive login (=a user logs in) which worked fine. I now want to PnP-provision some folders and content types using application permissions with the ...
Heinrich Ulbricht's user avatar
0 votes
1 answer
1k views

Graph SDK C# - PageIterator.IterateAsync() - Invalid filter clause

I am calling Graph with the SDK in C#, my initial request works fine and I get 200 results but the iterator returns an error with an invalid filter clause. The initial call with the filter works ...
CKelly-Cook's user avatar
1 vote
1 answer
2k views

Remove user photo for User

I have a requirement to remove the user photo from Azure AD User profile. I checked for MS Graph APIs for User Photos. But as far as I know, MS Graph APIs are only available to add/upload photo. There ...
Dikesh Gandhi's user avatar
1 vote
1 answer
2k views

Unable to upload file to specific SharePoint drive,

I am trying to upload a file to SharePoint drive using graph API. I am doing OAuth using the below-mentioned link: GET https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0/authorize?client_id={...
Souvik Maity's user avatar
0 votes
1 answer
270 views

Graph DriveItem returned WebUrl format different for .txt and .docx

I am currently using a delta query to retrieve drive items for my drive e.g. var delta = await client .Sites["siteId"] .Drives["driveId"] ...
A.W.'s user avatar
  • 13
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
3 votes
1 answer
1k views

Get members of a private channel in Microsoft Teams

Connect-SPOService -Url https://site-admin.sharepoint.com $privateSites = Get-SPOSite | Where-Object -Property Template -eq "TEAMCHANNEL#0" Any attempt to get the list of members for a ...
James's user avatar
  • 31
1 vote
1 answer
644 views

Multiple webpart with MGT Control not working in single page in React SPFX Sharepoint

I have used MGT Person Control in my two SPFx web parts. If I add the single web part on one page and another web part in another page, both web parts are working properly. And if I add both the web ...
Dev Joshi's user avatar
1 vote
0 answers
420 views

Get recently added / updated users from Azure Active Directory

I want to fetch all the users from Azure Active Directory who are recently modified/added using Graph API SDK. I tried to search for the lastModified, or Modified property which returns the last ...
Dhruvil Prajapati's user avatar
0 votes
1 answer
882 views

What is the algorithm behind My News in SharePoint app bar?

Could you please tell me what is the algorithm behind My News in SharePoint app bar, which has been introduced recently.
sarbashis's user avatar
1 vote
0 answers
1k views

help with error ClientAuthError: User login is required. For silent calls, request must contain either sid or login_hint

I'm using MSAL.js to acquire a silent token and it works ok when i login See my snippet code below var userid = _spPageContextInfo.userId; //console.log(email); var upn = getUserEmailByLoginName(...
naijacoder's user avatar
  • 4,282
1 vote
2 answers
3k views

what filtering options are supported MS graph api (List used) - Javascript?

I'm working on a script and I can call the below Graph API endpoint. https://graph.microsoft.com/v1.0/me/insights/used without any issue. But I would like to use filter like so: var srchStr = "...
naijacoder's user avatar
  • 4,282
0 votes
2 answers
1k views

Authenticate via Graph API without an app secret or an app certificate?

Sorry for the lazy and not well formulated question. Is it possible to authenticate via Graph API without an app secret or an app certificate via PowerShell withiut being a tenant admin? I was on a ...
Denis Molodtsov's user avatar
0 votes
1 answer
954 views

What query to use ti get recent files from a particular document library - Graph Api

I'm wondering if anyone has had to do a similar thing to be able to get all recent files from a particular site collection of sharepoint library To get lists used i know i can use this - https://graph....
naijacoder's user avatar
  • 4,282
0 votes
1 answer
2k views

Error Access to XMLHttpRequest at "http" from origin has been blocked by CORS policy - Graph API -

I would like to retrieve list of recent files from a particular document library or site for the logged on user This is using a content editor on a sharepoint classic site When i run the code below i ...
naijacoder's user avatar
  • 4,282
1 vote
1 answer
2k views

How to get the user's group(s) for sharepoint online site usig Microsoft Graph APIs

I am trying to get the user's group(s) for SharePoint online site using Microsoft Graph APIs. But I am not getting any equivalent graph API for the below SharePoint rest API : /_api/web/SiteUsers/...
sagarg's user avatar
  • 23
0 votes
1 answer
1k views

How to call graph API to read SP list items from SPFx in SP Online?

I'm new to graph API and trying to use graph API to read SP list items from a custom list using the current user's rights (not service account). But I'm getting an error. I have this so far: In the ...
omega's user avatar
  • 2,160
0 votes
1 answer
227 views

External Data in SharePoint online modern

How to get External Data into SharePoint online? What are the possible ways to get the external data using api and show the data in Search How to show external data in SharePoint Search?
Mani's user avatar
  • 1
1 vote
1 answer
219 views

Fetch an image from OneDrive Business by ID using Graph API using PowerShell

I'm attempting to retrieve an image from my OneDrive via the Microsoft Graph API. I made sure to have all the necessary permissions to do so. This has worked in the past, but now it's returning error ...
Ress's user avatar
  • 85
0 votes
2 answers
1k views

How can I get parent guid of an item?

I have a list with items in SharePoint Online. There many items and their structure look like a tree. list/ itemA/ itemB/ itemBa/ itemX itemBb/ ...
Artur Auhatov's user avatar
0 votes
1 answer
2k views

Fetching Specific User's Profile Photo via Graph API in SPFX

How can we fetch a user profile photo through Graph API and display into Web part in SPFX? Here is my function to call Graph API to fetch Specific user's Profile Photo filtering through their ...
abhishek23 Negi's user avatar
0 votes
1 answer
5k views

Using Filter Query in Graph API to fetch the particular users

Current code: public render(): void { this.context.msGraphClientFactory .getClient() .then((graphclient:MSGraphClient): void=>{ graphclient .api('/users') .filter('Department eq IT') .get(...
abhishek23 Negi's user avatar
1 vote
1 answer
2k views

List Permissions for Sharepoint Sites Using GraphAPI

I'm trying to retrieve site permissions for SharePoint sites using GraphAPI. I've got the API working and can list sites, subsites, lists, drives, etc. However, when I run /sites/{siteID}/permissions ...
user3263903's user avatar
1 vote
0 answers
108 views

GraphAPI send invitation to external/guest user for a specific SharePoint site

Language: JavaScript - MSAL library Scope: GraphAPI Is there a way to send an invitation to an external user thorough GraphAPI that will be valid only for a specific site. Currently I am using the ...
JohnRambo's user avatar
  • 187
0 votes
0 answers
324 views

Power Automate - how to send an news digest only to members who have not read the news post

I'm creating a Power Automate workflow that sends out a news digest to all members of the site. I would like this news digest only to be send to the member(s) when the news post hasn't been read ...
Yannick's user avatar
0 votes
2 answers
295 views

Unable to list files in Sharepoint doc library with a custom app

I have a custom app (actually an R package) that uses the Graph API to talk to Sharepoint. One of my users has reported that they are unable to list files in folders: either a 404 or 400 error is ...
Hong Ooi's user avatar
  • 123
0 votes
1 answer
932 views

Setting "Site sharing settings" programmatically

I am trying to programmatically set the "Site sharing settings" options under "Site Permissions" -> "Change how members can share" screen on a Modern site. I would ...
Hank's user avatar
  • 103
2 votes
1 answer
11k views

Microsoft Graph API to get all the all the folders from SharePoint Document library

I am trying to get the all the folders from SharePoint library using Graph API. But I am able to get only level one folder Folder 1 Folder 1 Sub Folder Folder 2 Folder Sub Folder Using below ...
Akshay Dattatray Nangare's user avatar
0 votes
1 answer
232 views

resourceData returns null for microsoft graph API change notificaiton for SharePoint List

I have created a change notification for SharePoint "Access Requests" list. I am getting Notifcation when change ocurred in list. but i am not getting resourceData as usually we got with ...
Rajat Sahani's user avatar
0 votes
2 answers
1k views

Graph Api call with filter query

How can I filter the API call dynamically passing through variable? I am getting value in this variable through another API call: var userid; this.props.context.msGraphClientFactory.getClient().then(...
abhishek23 Negi's user avatar
0 votes
1 answer
147 views

Microsoft Graph change notifications -- For SharePoint Group for Tenant Level

I have requirement that whenever there will be any new user added in in SharePoint Site Group. I need to put the details for that group, User, Site details in another Data base. Can We user Microsoft ...
Rajat Sahani's user avatar
0 votes
1 answer
118 views

Fetching all planner Task through Graph API

Why i am getting null value in {"CreatedBy : User :DisplayName"} and also in {"Assignments : AssignedBy :User :DisplayName"}
abhishek23 Negi's user avatar
0 votes
1 answer
178 views

Fetching the Outlook Task's Data into Webpart using Graph Api call

I am using render function to make Graph Api call I have created a function _outlookTask to fetch the outlook task's data How to make Graph Api call with Selecting the HTTP method as GET and then, ...
abhishek23 Negi's user avatar
0 votes
1 answer
1k views

Spfx with PnP.js / Graph: How to prevent redirect to spfxsinglesignon.aspx

We're developing an SPO custom web part, utilizing https://pnp.github.io/pnpjs for authentication and for communicating with SPO. I've noticed that when the page with our custom web part loads, the ...
kenneho's user avatar
  • 163
2 votes
2 answers
1k views

createLink graph api request

I am trying to create a sharedURL via a picker in my app that constucts a web url with a query par linked to a sharepoint file, which reads into the app on load. For some reason if I grab the manual ...
JasonC's user avatar
  • 21
1 vote
2 answers
3k views

Is it possible to extract and/or set users' birthday with a PowerShell script?

I've been doing some investigating and apparently a user's birthday date (the one that shows up on Delve) is not stored in a property inside the user's own office365 account object. I'm trying to ...
Ress's user avatar
  • 85
1 vote
3 answers
3k views

SharePoint dynamic employee directory

I'm looking for a solution to be able to create a dynamic employee directory. Right now our company uses a SharePoint list that is filled by HR whenever a new employee comes on board, but this is ...
Ress's user avatar
  • 85
0 votes
2 answers
142 views

Can GraphAPI be used to create item to list using SPFx, even if Current Loged-In user have have only Read Permission on list?

With SPFx can item be created in a list using GraphAPI if User have only "Read" permission on list? Will granting delegate Permission to SPFx solution with Sites.ReadWrite,Site.All will work?...
user27178's user avatar
  • 372
1 vote
3 answers
122 views

SP Online usage report expose users visiting a site

Asking if there is a way to see on who are the specific users who viewed a site? Currently I am only seeing Counts as a report. We are targeting to create a report that can also expose the users who ...
John Louie Chan's user avatar
1 vote
1 answer
754 views

How to retrieve a folder or document with a hash in the name using ms graph api

I am using MS graph API to retrieve folder contents and graphs from SharePoint online, using URLs like [...]/drive/root:/folder1/folder2:/. The folder and document names are of course URL encoded. It ...
Andy's user avatar
  • 111
0 votes
1 answer
356 views

Which Graph API will help me to fetch site usage details such as Unique viewers, Site visits, etc for an individual site?

My requirement is to create a small spfx webpart showing selected Sharepoint site's usage details. I tried searching for this question, but landed up finding Graph api fetching usage details of ...
Ruchira Sapkal's user avatar
1 vote
1 answer
273 views

SharePoint online webhooks - Graph API or SharePoint API?

I'm currently working on a feature for an application where we want to sync files from a SharePoint Online document library to a storage account on Azure. We've been looking at using SharePoint Online ...
Thomas de Wulf's user avatar
0 votes
1 answer
217 views

Authenticate the SmtpClient using AppID and APPSecret instead of passing the username and password

I have the following SharePoint CSOM code inside my c# console application to send an email using the office 365 admin username and password using the client.Credentials = new ...
John John's user avatar