Access to a shared notebook using microsoft graph's API - microsoft-graph-api

I found it no way to find the notebook's id shared in my team using Microsoft Graph API. How can I update content in a shared location in out team..?
GET https://graph.microsoft.com/v1.0/me/onenote/notebooks
This only gives back the notebook created by me.

There are a couple of workaround ways you can do this:
Access the notebook via the individual who owns it:
https://graph.microsoft.com/v1.0/users/uid/onenote/notebooks
Access the notebooks shared with your group:
https://graph.microsoft.com/v1.0/groups/gid/onenote/notebooks

Related

Is it possible to give read permissions to users in sharepoint using Microsoft Graph

I'm using Microsoft Graph API to upload large files to sharepoint using createUploadSession endpoint.
Is there a way to give read permissions in upload process to a specific user or I have to use other endpoint for this?
Yes it is possible to manage and change permissions of SharePoint online using Microsoft Graph API EndPoints: link
Permissions are managed separately through MS Graph End Points designated for permissions: link
Another stackover article on the same with slight different issue: link

Create OneNote notebook in document library (other than OneDrive) using graph api

I have created another document library in my personal sharepoint site. When I run the
GET /me/drives/
It shows both OneDrive and my created document library. Since I can create OneNote Notebook in the another document library from the UI, I want to achieve the same thing using graph api. However, currently supported graph api to create notebook are
POST /me/onenote/notebooks
POST /users/{id | userPrincipalName}/onenote/notebooks
POST /groups/{id}/onenote/notebooks
POST /sites/{id}/onenote/notebooks
When I execute any one of these api, it always creates Notebook in the OneDrive. Is there any way to create Notebook in the specific document library?
This should work in Onenote-API
POST https://www.onenote.com/api/beta/myOrganization/siteCollections/{id}/sites/{id}/notes/notebooks
or Graph-API
POST https://graph.microsoft.com/beta/sites/westerneye.sharepoint.com,{sitecollectionid},{siteid}/onenote/notebooks

It is possible to fetch user/mailbox type using Microsoft graph API?

I am trying to get informations about user/mailbox type (regular, distribution list, shared mailbox, alias) using the Microsoft graph API. I tried using the /users endpoint but I see there is no field with such info. Is there any way of doing this?
https://learn.microsoft.com/en-us/graph/api/user-list?view=graph-rest-1.0&tabs=http
Thanks!
That information is only available from Exchange PowerShell (Get-Mailbox), which isn't yet available via Graph. You can get a list of groups (https://learn.microsoft.com/en-us/graph/api/group-list?view=graph-rest-1.0&tabs=http) and a list of users (https://learn.microsoft.com/en-us/graph/api/user-list?view=graph-rest-1.0&tabs=http). I don't know if that will work for your purposes.

Can I get a list of all Shared Mailboxes using Microsoft Graph Api

I would like to get a list of all the Shared mail boxes on my exchange server. An then I require to get details of each member of the shared mail boxes. How to achieve this via the graph api
I know we can do this via powershell but I would like to use the rest APIs in my javascript application.
I've come across multiple threads/forums claiming that microsoft had this in roadmap so have they implemented it?
This isn't a supported scenario with Microsoft Graph. For administrative managing and reporting of Exchange, you'll need to use PowerShell.

Accessing shared notebooks pages and sections for Onenote for business acoount

I am integration onenote with my application. I am using below mentioned API to retrieve all notebooks that a user can potentially access to.
https://graph.microsoft.com/v1.0/me/onenote/notebooks?includesharednotebooks=true
I am able to retrieve all the notebooks owned by me and shared with me. The problem is in case on business account I am not able to further access the pages and sections which are inside shared notebooks. For all owned notebooks I can still access the pages and sections. How I can resolve this issue ?
This is a blocker for me. Kindly revert
Have you tried accessing the notebooks by site?
Call the API
For any given notebook that doesn't belong to the owner, look for the site id given the site URL
Use that site id to do a ~sites/id/notes/... request
In Graph, you might be able to look up the site by keyword. Example:
https://graph.microsoft.com/v1.0/sites?search=contoso

Resources