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.
Related
I have a requirement to write a Flow using power automate.
The requirement is to check if a user has access to given SharePoint site. Here SharePoint site address will be given as input.
I'm wondering how to achieve this using REST API in power automate.
With REST API, you cannot check user permission directly, alternate is to use effectiveBasePermissions for different masks. Blog here.
And for Power Automate, I am not sure if you can carry further steps mentioned in the blog.
Similar thread: How to get user's permission on SharePoint site with REST API?
The workaround I can think of will be checking if the user is in a SharePoint group. You can get all users in a SharePoint group via REST API, and check if the user is inside of it.
Recently Microsoft published the Microsoft Search API (beta) which provides the possibility to index external systems by creating a MS Graph search custom connector.
To achieve this I created 2 Search Custom Connectors:
one according to Microsoft Graph Search Connector Sample from GitHub
and one on my own, step by step according to the official MS instructions
Create the Connector app in Azure
Add app registration (Single tenant)
Add required API permissions and give admin consent
Add a client secret
Get access token (via Postman)
Get the required parameters from app registration
Submit a login request to get the (bearer) token
Create a new connection (via Postman)
Registering a schema (via Postman)
Add items to the search index (via Postman)
Both variants worked well so far but if I now try a search (for example via Bing (activated for our O365 tenant, or in the Microsoft Search Center, logged in as the appropriate account) no results from the custom connectors are shown.
Via Graph Explorer, logged in as the appropriate account and using the query https://graph.microsoft.com/beta/search/query, I get an http status 500 ("InternalServerError", "The call failed, please try again."): Screenshot from Graph Explorer
Under > Microsoft 365 admin center > Microsoft Search > Connectors both connectors are displayed but there is displayed neither any status nor any successful synchronisation: screenshot from MS 365 Search admin center
I know the Microsoft Search API in still in preview but I wonder if it works at all?
Is there any possibility to trigger the synchronisation manually?
Or at least find out what's going wrong here?
Did you create a new Result Type and Vertical as well in the Search center?
I followed the steps mentioned in the sample and the search works for me in Office 365.
Regarding the synchronization, I don't think that is available in the Search center as of now because there is no option to edit the connection or set any synchronization schedule. However, I'm still exploring other options to synchronize as its quite new to me.
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
Is it possible to create a SharePoint Content Type through MS Graph, like this POST https://graph.microsoft.com/v1.0/sites/{site-id}/ContentTypes? It seams that there are a lot of working endpoints that are not in the documentation.
I'm working on accessing document libraries for Sharepoint sites via Mircosoft Graph, but haven't had any luck so far.
Here is my setup:
I have two sites
https://mydomain.sharepoint.com
https://mydomain.sharepoint.com/teams/MyTestSite
When I make an api call to https://graph.microsoft.com/v1.0/drives, the response doesn't contain id of document library for second site (https://mydomain.sharepoint.com/teams/MyTestSite).
I have gone through documentation and haven't found anything on how to accomplish this. If anyone got any idea about this, please share.
Thanks.
I was able to figure out a solution for this. A sharepoint site is represented as a Group in Office 365. I found that out by doing some hit and trial.
So, after looking up their documentation for anything related to a Group, I got to this: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/group
And, by using the List groups endpoint I was finally able to get a list of all the Sharepoint sites which the authenticated user can access.
This API call requires Group.Read.All scope while requesting access token and only Admin users can authorize this scope. So, this will need a separate interface for Admin to list groups, potentially store the group-user mapping on my app for the user to be able to make api call (/groups/{group-id}/drive/items/{item-id}) related to the drive.
The V1.0 API has a way to list your doc lib as follows
GET https://graph.microsoft.com/v1.0/sites/mydomain.sharepoint.com:/Teams/MyTestSite:/drives
Hope this helps.
The beta API also exposes a Sharepoint endpoint.
You can also use the path if you already know your site structure:
GET https://graph.microsoft.com/beta/sharepoint:/sites