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
Graph API and SharePoint on-premise
I don't think Microsoft Graph API will be available for on-premises. Microsoft graph is part of Azure infrastructure and does not know anything about your local environment. To use Graph API you need ...
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?
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
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
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
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
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
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
Oauth Authentication for SharePoint REST API
As of this moment, access to SharePoint endpoint via Graph API is possible only through the beta endpoint.
Your URL should be as below:
https://graph.microsoft.com/beta/sites/tenantname.sharepoint....
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 ...
2
votes
Accepted
How can I deploy a SharePoint Framework webpart with a Microsoft Graph API query as an add-in?
I was trying to connect to Graph API in SPFx environment and mostly failed. But now SPFx has GraphHttpClient available, which is still in development phase but can able to read groups. You can have a ...
2
votes
How to save image as attachment in List using CSOM C#?
There 2 ways you can add attachments to list items.
Option 1 - .AttachmentFiles.Add(attachmentInfo) as below using FileStream:
var list = context.Web.Lists.GetByTitle("CustomList");
var listItem = ...
2
votes
Accepted
How to save image as attachment in List using CSOM C#?
I have used this in PowrShell Scripts
May be it will help you
foreach($item in $Items)
{
if($item.Attachments -ne $null)
{
try
{
foreach($attachment in $item.Attachments)
{
...
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
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 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 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
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
microsoft-graph × 295sharepoint-online × 202
spfx × 46
sharepoint-rest-api × 40
graph-api × 38
spfx-webparts × 33
office-365 × 24
azure-ad-graph-api × 19
development × 15
power-automate × 14
rest × 13
api × 11
list × 10
ms-graph-client × 10
powershell × 9
document-library × 8
modern-experience × 8
site × 8
microsoft-teams × 8
typescript × 8
permissions × 7
csom × 7
azure-ad × 7
office-graph × 7
javascript × 6