8
votes
Accepted
How can I get the office 365 group id for a modern site I've just provisioned?
To solve your issue, instead of provisioning Modern team sites using CreateSiteAsync method, you should provision your site using the CreateUnifiedGroup method of PnP.
This will return your Office ...
7
votes
Accepted
How to do Microsoft Graph API Filter on Lookup Column in SharePoint List Items?
The the following expression demonstrates how to filter by lookup field id:
&filter=fields/<LookupFieldName>LookupId eq '<LookupFieldValue>'
Pay attention to lookup field name ...
6
votes
spfx context undefined
This is because the msGraphClientFactory is an object on the SPFx web part context and not the react component context.
You will need to pass the msGraphClientFactory object explicitly as a property ...
5
votes
Accepted
How to make a POST call to Microsoft Graph in SPFx (using MSGraphClient)?
MSGraphClient is still in preview and will not work in production tenants as of writing this. Have tested the below the code and it works in Developer tenant.
Add the below import statement:
import {...
5
votes
Does the Microsoft Graph support driveItem change notifications for SharePoint Online?
I just implemented such a feature for our webapp accessing a customer's SharePoint site. So to make the process for anyone searching for this a bit less painful than it was for me, here's a quick ...
4
votes
Accepted
Get all the user info using Microsoft Graph
Since the GraphHttpClient provided with the SharePoint Framework is limited at the moment, you have to use ADAL JS instead. You can read more about the approach and it’s considerations at https://docs....
4
votes
SPFx: Can you use WebPartContext in components different than the main one?
You can pass it through the props:
In your other component define props interface:
export interface IProps {
description: string;
ctx: WebPartContext;
}
Declare your second component as ...
4
votes
SPFx: Can you use WebPartContext in components different than the main one?
Are you passing the context down as part of props?
According to this other answer, this.context.pageContext is only available in the top level class/component that inherits from BaseClientSideWebPart,...
4
votes
Accepted
sharepoint graph api filtering based on a list column value
You can try filtering list items by using similar query as given below:
For List on root site:
https://graph.microsoft.com/beta/sites/mytenant.sharepoint.com/lists/MyListName/items?expand=fields(...
4
votes
Accepted
Expertise from Delve via Graph API
I had the exact same question, hunted around and could not find the answer. It's not listed on: https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0
But through some Trial ...
4
votes
How to restrict App Only permissions to one site
This is indeed not possible yet (still not, 7 months after you posted this).
Here is proof: https://github.com/SharePoint/sp-dev-docs/issues/5730
Microsoft did however announce they will solve this ...
3
votes
Accepted
Where is the "Service Principal Permissions Management Page"?
The exact URL of the page is as below:
https://tenant-admin.sharepoint.com/_layouts/15/online/
AdminHome.aspx#/webApiPermissionManagement
It is available as part of the new Admin center.
You should ...
3
votes
Accepted
SharePoint Rest API : Recent SharePoint Sites
I dont know if you have gotten a answer to this question some other way but here is a possible solution to your Office graph is disabled problem.
By simply adding an extra header to your request it ...
3
votes
Accepted
Microsoft Graph API - SharePoint List Items not returning
I'm not sure if you are still having the problem, but I was experiencing the same. I could perform the query using Graph Explorer but not when I tried in code. I could get all the way to the SP List ...
3
votes
Accepted
Outlook Calendar in SharePoint Online. Graph API?
Ended up using Layer 2 Cloud Connector to sync O365 Resource calendar (which can auto accept invites) events to a SharePoint list then in SharePoint used jquery FullCalendar. Layer 2 Exchange data ...
3
votes
Accepted
Get "lastModifiedDateTime" with MS Graph or REST
You could use SP API _api/web/Lists/GetByTitle('listName') endpoint which returns list informations and deal with LastItemDeletedDate and LastItemModifiedDate.
Here's a working code:
var requestUri = ...
3
votes
Problems with MSGraph POST in SPFx React
This doesn't answer all your question, but this is to the first error MSGraphClient.serviceKey,
Since 1.6 the MSGraphClient and AadHttpClient classes no longer expose a serviceKey property which ...
3
votes
Accepted
Access Graph API from localhost (SharePoint extension)
The Leverage the Microsoft Graph & 3rd Party APIs training module shows how to configure your project to use the Microsoft Graph. The training module shows how to do so in a web part project, but ...
3
votes
Accepted
List all the members of SharePoint groups with Graph API
There is no dedicated endpoint in Microsoft Graph to get SharePoint Group permissions or their members.
If you want to get the list of all users & groups in SharePoint site, you can query "...
2
votes
Unable to call graph API from SharePoint page
I was able to get this working. So basically, all the steps mentioned in the blog were applied and they are correct. However, for me I had to set the reply URL to the page from which I was calling the ...
2
votes
How could I get all root level sites (excluding sub site) using Microsoft Graph API?
Microsoft Graph documentation says the following filter expression could be utilized to list all root-level site collections:
siteCollection/root ne null
But unfortunately i have not managed to get ...
2
votes
Does Anyone Have idea about Stream?
As of today, there is provision for using Stream videos only in SharePoint Online. Link - Microsoft Stream webpart for SharePoint Online
But, we can expect Microsoft to release their administrative ...
2
votes
Accepted
Work with Files and DocumentLibraries with Microsoft Graph
First you can get the libraries data:
https://graph.microsoft.com/beta/sites/{hostName}:/{optionalSubsiteUrl}:/drives
example:
https://graph.microsoft.com/beta/sites/yoursite.sharepoint.com:/sites/...
2
votes
How to make a POST call to Microsoft Graph in SPFx (using MSGraphClient)?
This should help you get started. Here I'm registering a webhook
const graphClient = this.context.serviceScope.consume(MSGraphClient.serviceKey)
const future: Date = new Date(Date.now() + 4320 * 60);
...
2
votes
How to filter listitems with user name or email when using Graph Api?
Even though it might sound like a straightforward query, surprisingly it seems filtering by user field is not supported except the case when user id is provided.
I have come up with the following ...
2
votes
How to avoid credential popup, to connect with graph API in the powershell script?
Did you try this ?
This PowerShell sample demonstrates how to use the Office Dev PnP PowerShell to connect to the Microsoft Graph using Application Permissions. Using application permissions is ...
2
votes
Accepted
Populate User/People field in CSOM using Azure AD user ID
I'm literally getting into the bad habbit of answering my own questions ffs....
Anyway, the fix is simple, you need to use the username ex :
var managerField = FieldUserValue....
2
votes
Accepted
Expand Multiple Lookup field with Microsoft Graph
Per my testing, you could use V1.0 to get lookup addition filed.
For example:
https://graph.microsoft.com/v1.0/sites/siteid/lists/dc0935d2-8cda-4bf2-b896-bb43e39bfbdb/items/2?expand=fields
Return ...
2
votes
Accepted
How to get Site Owner Via Graph
Yes, I tried this before and by default Site resource does not provide owner property. As of now, by using /sites/{site-id} graph returns only below given properties:
@odata.context
createdDateTime
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
microsoft-graph × 285sharepoint-online × 195
spfx × 45
sharepoint-rest-api × 41
graph-api × 41
spfx-webparts × 30
office-365 × 24
azure-ad-graph-api × 18
power-automate × 15
development × 14
rest × 13
ms-graph-client × 11
list × 10
api × 9
powershell × 8
document-library × 8
modern-experience × 8
site × 8
typescript × 8
azure-ad × 8
permissions × 7
csom × 7
office-graph × 7
javascript × 6
flow × 6