Add sharepoint custom field using Graph API - sharepoint

I want to upload my documents to my SharePoint site using Graph API. I followed the instruction in these posts and I'm able to upload my docs to Sharepoint site.
How to create SharePoint list item with Microsoft Graph API?
https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/driveitem_put_content
However, I want to update some values of uploaded documents in the Document Library items but I cannot find any document to do that. Please advise me in this situation.
Notice: I found the solution by this post.
How To Retrieve Custom Columns For DriveItems in MS Graph

Related

How I can specify ms-planner storage place on SharePoint?

I'm using Microsoft SharePoint and MS Planner, I have a plan that's connected to SharePoint website, so everything I post in planner automatically shows in SharePoint.
So whenever I upload an attachment it is uploaded to Sharepoint site/shared document
I want to create a specific folder inside documents and make attachments that I upload in planner go directly there.
is there any way to do that?
Currently this is not supported. You can vote for the suggestion to add this feature though:
https://feedbackportal.microsoft.com/feedback/idea/91702db7-3252-ec11-a819-000d3a7c684e

Need help on searching a document form Sitepage in Sharepoint using Microsoft Graph

I am working on SharePoint Integration where i am able to success using Microsoft Graph Explorer for a Site search using Drive id.
Here is how i am able search for a Single Site:
https://graph.microsoft.com/v1.0/drives/b!I9A-JY94D0CQp-2TBvsUupBLMUF2SrJHp5VylC7DY8DpCdF-7uQ6NTp6t-MRD8/root/search(q='sharepoint')
With this i am able to get the details of the record 'Sharepoint'.
Now i am trying to search in SitePage where we have Documents added. Can anyone please help me the api to be used in Graph Explorer to get the correct result
I am able to SitePage id using
https://graph.microsoft.com/beta/sites/root/pages?$filter=name eq 'DevHome.aspx'
Your Approach is incorrect.
If you have to search the content of the document library added to a Site page, you need to query the doc library not the Site page.
Using Graph API you will not be able to search the content in the site page.

Fetching labels and metadata for sharepoint online documents from MS graph apis

Labels can be created for sharepoint online sites/document libraries. (Refer Labels in sharepoint)
How can be fetch labels for any document (or sites/DL) with microsoft graph apis?
Currently I am fetching document details with below graph apis which is not providing any label info for the document-
https://graph.microsoft.com/v1.0/sites/<SITE_ID>/drives/<DRIVE_ID>/root/children
Along with above, Is it possible to fetch document metadata with MS graph api?
(Refer Managed Metadata)
You can try the following API to get labels and metadata(Based on my test, i cannot get the labels/metadata you pointed, no other official docs have clear explanation of these two points too):
GET /sites/{site-id}/lists/{list-id}/items/{item-id}?expand=fields
https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/listitem_get
If you cannot get the information by the expand=fields too, I'd suggest you to submit a feature request: https://officespdev.uservoice.com/

Microsoft Graph Custom User Properties

I followed instructions here: http://www.learningsharepoint.com/2016/03/08/office-365-working-with-new-delve-profile-page-top-features/ which allows me to add custom profile fields to MS Delve.
Is there anyway to access those created fields via the MS Graph api? I've tried everything I Can think of, including using the beta api, directly $select 'ing the data in the REST request, and can't seem to figure it out.
I've read a lot about extensions, but can't seem to get this data.
You made a custom profile field in the SharePoint User Profile Database. Currently there is no MS Graph API for accessing a user profile in SharePoint. You could use the SharePoint Rest API for this.

Microsoft Graph API - Search content over a sharepoint site

We are creating a Sharepoint webpart that enable searching a Sharepoint site contents using Microsoft Graph Api. I am able to get the Lists and subsites
using graph Api, but not sure how to search any content at site level.
Looking for any pointers if this is even achievable.
Below are some of the API calls that work-
https://graph.microsoft.com/v1.0/sites/tenants/lists?select=id,name
https://graph.microsoft.com/v1.0/sites/tenants:/sites/sitename:/sites?search=subsitename
https://graph.microsoft.com/v1.0/sites/tenants:/sites/sitecollection:/lists
here is an example filtering on a list items
https://graph.microsoft.com/v1.0/sites/myThing.sharepoint.com,ffffffff-ffff-ffff-ffff-ffffffffffff,12345678-1234-1234-1234-123456789012/lists/25dd5a71-69a9-44f8-b60f-ed16718eae54/items?expand=fields(select%3DTitle,ID,ContentType,myLookupID)&top=1000&filter=fields/ContentType eq 'My Page'

Resources