Access current SharePoint Online user’s “Liked” & “Saved for later” docs/pages via Microsoft Graph API? - microsoft-graph-api

At the bottom of most pages/docs in SharePoint Online modern pages, there are “Like” and “Save for later” toggles.
I would like to be able to programmatically retrieve a list of things that were either “Liked” or “Saved for later” by the currently logged in user.
Is this something I can fetch using the Microsoft Graph or does SharePoint have something more readily available for reading this data?

The ability to return the list of items of drive items that are followed is currently available in beta
https://learn.microsoft.com/en-us/graph/api/drive-list-following?view=graph-rest-beta
I believe that Like and save for later are different from follow. You may want to try this API to see whether they show up or not.

Related

Search in all user's channel messages

Can I use the Microsoft Graph API for Teams to search in messages of all channels the user has access to? I.e. can I use the API to build something like the search bar on top of the Microsoft Teams app?
The functionality (similar like search bar) is not exposed at this point... But for time being you can try this, you should get all the channels that you're part of. Then you make can make the Graph API call to get list of messages. In addition to that you can consider filing a Microsoft Uservoice, so it can be considered as new feature request and can be implemented.

How to get list of apps assigned to me using the Microsoft Graph?

Is it possible using the Microsoft Graph to retrieve the list of applications assigned to me (basically the information displayed at myapps.microsoft.com)?

Microsoft Graph Sharepoint search inconsistent results

I am trying to implement a feature in our app to allow users to search for files in their Sharepoint & OneDrive accounts, as they see in Office365.
I am having trouble understanding why I am not seeing expected results from search API requests.
When I make a search request like this, I get 1 result as expected:
https://graph.microsoft.com/v1.0/sites/{my-site -id}/drive/root/search(q='brisbane')
However, when I search like this, there are no results:
https://graph.microsoft.com/v1.0/me/drive/search(q='brisbane')
If I modify the query for /me/drive/search, I do see results from OneDrive, but not from SharePoint.
According to the Microsoft Graph docs, /me/drive/search should search for 'Items a user can access'.
Is this the expected result? Is there any way to search all the current users' Sharepoint sites? Or do I have to ask the user to configure the sites they would like to search, then search each of them separately?
This is by design. You need to read below the "Searching for items a user can access" heading to understand what this means:
In addition to searching for items within a drive, your app can search more broadly to include items shared with the current user. To broaden the search scope, use the search method on the Drive resource.
When you're searching /me/drive/ you are searching that user's OneDrive for files they have uploaded themselves or have been explicitly shared with them. Files that live within a SharePoint library that a user happens to have access to are quite different than files "shared" with that user.

Microsoft Graph with OneDrive for Business - remove item from 'Shared with me' list

Using https://graph.microsoft.com/v1.0/me/drive/sharedWithMe I can get a list of all items shared with me and by default all these files are displayed in 'Shared with me' tab in OneDrive for Business.
Through the browser it's possible to remove specified item from this list by clicking on it and removing, so item no longer is displayed but I still can access it.
The request is made to:
https://{tenant}-my.sharepoint.com/personal/{user}/_api/SP.Sharing.DocumentSharingManager.RemoveItemsFromSharedWithMeView
Can I remove item from this list using graph.microsoft.com endpoint or Microsoft Graph .NET Client library?
Currently there is no support for removing an item from the shared with me list using OneDrive or Graph APIs/SDKs. But you bring up a good point. I will make a note of it and see if this is something we can add support for.

How to Embed a PowerBI Tile in a Rails app? (and apply filter to it)

I'm struggling with this since a week... I have tried so many things, read so many documentations (walkthrougsh), I can't find any solutions and I have lost the clarity. I really need your help.
I have created a simple Rails app.
I have a Power BI account and a Azure account.
I'm using an example set of data on PowerBI (Retail Analysis Sample).
I want my users to signin on my app (through devise), then access to some pages and see embedded PowerBI Tiles (or report, or dashboard maybe). Then I want them to be able to filter the results. A client-side example is https://microsoft.github.io/PowerBI-JavaScript/demo/filters.html.
I want to be able to do the same.
I'm lost with all the client id, secret, ressource uri, ressource url, ...
What solution/walkthrough must I use?
Thank you so much for your time
Fro
New tile API allows to integrate content from a user’s Power BI
account into application UI for tiles that are on a user’s
dashboards. You can leverage this to add personalized BI content from
your user’s Power BI account into your application.
See documentation
A Sample application
You may want to look into Power Bi Embedded here. This will allow you to control who can see what content from within your application without having to authenticate with the Power Bi service. Power Bi Embedded is an azure service that allows you to upload pbix files which are then subsequently available for view by using an "Access key" to get a token to view the report. I know it works well for displaying "Reports," I am not sure about just showing "Tiles." They recently released RLS and some new Javascript SDK for more advanced features like filtering, check that here.
Hope this helps.

Resources