OneNote API, Unknown User - microsoft-graph-api

I'm looking for a solution to hide (or at least change) the "UU" (Unknown User) in the Microsoft OneNote application, when the page has been feed using the Microsoft Graph API with an application access (The application edits the OneNote on his own).
small view of what appends
when right clicking on "UU"
I know there is a solution to disable it on each page in the OneNote app, but my app generates a lot of pages.
Anyone who have achieve disable or change this ?

This is by design. As there isn't an authenticated user, there is no way for OneNote to know who to attribute a given change too.
Assuming you're creating these pages in a small number of notebooks, you can select "Disable History for this Notebook" under the Recycle Bin and turn off versioning/tracking altogether.

Related

Microsoft OneNote Graph API page creation with background

I am using the Microsoft one-note graph API for creating pages according to their demand in HTML.
Is there any possibility to create a page with a background image? Because I would like to use it as the background of a fillable form.
I should be filled by handwriting with a pen on a tablet in the OneNote app.
Or are there any other, better approaches?
You can definitely create pages - see this link.
The background can be an image or pdf. I however much prefer to use a template page that you create yourself (directly in one note) and copy using page: copyToSection. This allows you to use the added functionality of onenote such as ruled pages, setting images as backgrounds, etc.

How to retrieve pages filtered by a tag from OneNote API?

Some of my pages have a OneNote Tag in it
https://learn.microsoft.com/en-us/graph/onenote-note-tags
I would like to retrieve only pages that contain a specific tag from a notebook.
Currently, I would need to
Get all the sections from a notebook
Get all the pages from a section
Get all content from pages
check if it contains data-tag="important" (example)
Is there a better way of doing this via the ms graph? (possibly via a combination of expand/filter)
Best
To get the pages in a notebook use the HTTP call below.
https://graph.microsoft.com/v1.0/me/onenote/pages
To compare the data-tag="important" is present in the content or not, it is not possible as of now but if your data is small you can use a work around by calling the below HTTP call and compare it for each page on your end.
https://graph.microsoft.com/v1.0/me/onenote/pages/pageid/content
If you have tons of data, it would be better to raise a Uservoice for this scenario by going to the Microsoft Graph Feedback Forum so that it can be implemented in the future.

Unable to use OData query to find some OneNote pages, others found OK

I'm using consumer OneNote in this scenario.
I have been querying my OneNote pages across a number of Notebooks using Graph with some success, but I've run into a strange issue. I'm note sure if it's a quirk in Graph or my Notebooks. I've reproduced the problem using Graph Explorer.
For example, If I issue the following request using Graph Explorer:
https://graph.microsoft.com/v1.0/me/onenote/pages?$top=100&$filter=id+eq+'0-fe674713edf84357871dbc179dfd924c!1-816F7725BEF00A5F!731388'
then I get a JSON response with the 'value' full of useful data.
If I issue the following request using Graph explorer:
https://graph.microsoft.com/v1.0/me/onenote/pages?$top=100&$filter=id+eq+'0-1f9aa8a73e9a4f14b4daa7762b5aa530!42-816F7725BEF00A5F!665027'
then I get a JSON response with an empty 'value'. All I've done is changed one known good ID for another known good ID.
I can:
Access both pages from Graph Explorer using a direct URL with the IDs used above
Access both pages using OneNote web app and Windows 10 version
Search for the 'lost' pages by title in the OneNote user interface successfully
It doesn't seem to matter what attribute of the pages I search for, the result is the same. Interestingly this only appears to affect pages from a certain point in one Notebook onward. The affected pages look OK in OneNote and load in both Web and Windows 10 version without problems.
I can create new pages in the Notebook containing the problem pages, but the new pages don't show up when I try to search for them using Graph.
Has anyone got a suggestion as to what I should try next?
EDIT:
New pages created in the problem Notebook do appear when searched for, it appears I was too impatient. The existing pages still cannot be found.
If the filtered page is not in the top 100 results, the response will be empty

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.

How to show Sharepoint Site Usage Statistics in a page?

What's the best way of showing site usage statistics in a page? I know I can view the stats from /_layouts/SpUsageSite.aspx and from designer also, but if I want to show this information in a customized way for a target audience, how can I show this data in a page? at least I need to show "recently visited pages".
You need to use the SharePoint class for return reports. See the SPUsage class on MSDN (http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spusage.aspx)
thanks all but I solved my problem quite easily, I simply used
spweb.GetUsageData(SPUsageReportType, SPUsagePeriodType)
didn't know SPWeb has such method, its enough for my requirement.
thank you #Chris SPUsage is also one solution I think, I'll try it next time
From the SP main page, go to the Site Actions, Site Settings, Modify All Site Settings and then select site Usage reports under the Site Administration column.
Once the page loads and shows you the stats. copy the url out of the browser and then ad that to a List or annoucements and then add that to your page as a web part with a hyper link to the stats report.
you could also create a new web-page and then insert an I-frame object with the stats report url and then link the new page to the parent site using a List.

Resources