Microsoft Onenote Section Bold

You can apply various font colors, font sizes or types, effects like Bold or Underline, and also highlights to your text. OneNote makes a basic set of Styles that you can use to format your notes. To apply a style, select the text you want to apply the style to, and then select the style you want to apply from the Styles gallery on the ribbon. Nov 24, 2019 Gem for OneNote v37 add new function to help you to customize headings style. Select a Paragraph with Style In this article, we choose a paragraph, its style is, Font name: Tohoma Font size: 18 Color: Orange Bold: Yes Save Selection as a Ne. To create a section group, do the following: Open or create a notebook in which you want to create one or more section groups. Right-click any section tab, and then click New Section Group. Type a name for the section group and then press Enter. You’ll see the new section group to the right of the section tabs near the top of the page.

-->

Applies to: Consumer notebooks on OneDrive | Enterprise notebooks on Microsoft 365

To get OneNote content and structure, you send a GET request to the target endpoint. For example:

GET ../onenote/pages/{id}

If the request is successful, Microsoft Graph returns a 200 HTTP status code and the entities or content that you requested. OneNote entities are returned as JSON objects that conform to the OData version 4.0 specification.

By using query string options, you can filter your queries and improve performance.

Construct the request URI

To construct the request URI, start with the service root URL:

https://graph.microsoft.com/v1.0/me/onenote


Then append the endpoint of the resource you want to retrieve. (Resource paths are shown in the next section.)

Your full request URI will look like one of these examples:

  • https://graph.microsoft.com/v1.0/me/onenote/notebooks/{id}/sections
  • https://graph.microsoft.com/v1.0/me/onenote/notes/pages
  • https://graph.microsoft.com/v1.0/me/onenote/pages?select=title,self

Note: Learn more about the service root URL.

Resource paths for GET requests

Use the following resource paths to get pages, sections, section groups, notebooks, and image or file resources.

Page collection

Get pages (metadata) across all notebooks.

../pages[?filter,orderby,select,expand,top,skip,search,count]


Get pages (metadata) from a specific section.

../sections/{section-id}/pages[?filter,orderby,select,expand,top,skip,search,count,pagelevel]


The `search` query string option is available for consumer notebooks only.

The default sort order for pages is lastModifiedTime desc.

The default query expands the parent section and selects the section's id, name, and self properties.

By default, only the top 20 entries are returned for GET pages requests. Requests that don't specify a top query string option return an @odata.nextLink link in the response that you can use to get the next 20 entries.

For the pages collection in a section, use pagelevel to return the indentation level of pages and their order within the section.

Example

GET ../sections/{section-id}/pages?pagelevel=true

Page entity

Get the metadata for a specific page.

../pages/{page-id}[?select,expand,pagelevel]


Pages can expand the parentNotebook and parentSection properties.

The default query expands the parent section and selects the section's id, name, and self properties.

Microsoft Onenote Section Bold

Use pagelevel to return the indentation level of the page and its order within its parent section.

Example

GET ../pages/{page-id}?pagelevel=true

Page preview

Get text and image preview content for a page.

../pages/{page-id}/preview

Onenote

The JSON response contains the preview content, which you can use to help users identify what's in the page.

The previewText property contains a text snippet from the page. Microsoft Graph returns complete phrases, up to a maximum of 300 characters.

If the page has an image that can be used to build a preview UI, the href property in the previewImageUrl object contains a link to a public image resource. You can use this link in HTML. Otherwise, href returns null.

Example

<img src='https://www.onenote.com/api/v1.0/resources/{id}/content?publicAuth=true&mimeType=image/png' />

Page HTML content

Get the HTML content of a page.

../pages/{page-id}/content[?includeIDs]

(learn more about returned HTML content)


Use the includeIDs=true query string option to get generated IDs used to update the page.

Section collection

Get all sections from all notebooks that are owned by the user, including sections in nested section groups.

../sections[?filter,orderby,select,top,skip,expand,count]


Get all sections that are directly under a specific section group.

../sectionGroups/{sectiongroup-id}/sections[?filter,orderby,select,top,skip,expand,count]


Get all sections that are directly under a specific notebook.

../notebooks/{notebook-id}/sections[?filter,orderby,select,top,skip,expand,count]


Sections can expand the parentNotebook and parentSectionGroup properties.

The default sort order for sections is name asc.

The default query expands the parent notebook and parent section group and selects their id, name, and self properties.

Section entity

Get a specific section.

../sections/{section-id}[?select,expand]


Sections can expand the parentNotebook and parentSectionGroup properties.

The default query expands the parent notebook and parent section group and selects their id, name, and self properties.

SectionGroup collection

Get all section groups from all notebooks that are owned by the user, including nested section groups.

../sectionGroups[?filter,orderby,select,top,skip,expand,count]


Get all section groups that are directly under a specific notebook.

../notebooks/{notebook-id}/sectionGroups[?filter,orderby,select,top,skip,expand,count]


Section groups can expand the sections, sectionGroups, parentNotebook, and parentSectionGroup properties.

The default sort order for section groups is name asc.

The default query expands the parent notebook and parent section group and selects their id, name, and self properties.

SectionGroup entity

Get a specific section group.

../sectionGroups/{sectiongroup-id}[?select,expand]


Section groups can expand the sections, sectionGroups, parentNotebook, and parentSectionGroup properties.

The default query expands the parent notebook and parent section group and selects their id, name, and self properties.

Notebook collection

Get all the notebooks that are owned by the user.

../notebooks[?filter,orderby,select,top,skip,expand,count]


Notebooks can expand the sections and sectionGroups properties.

The default sort order for notebooks is name asc.

Notebook entity

Get a specific notebook.

../notebooks/{notebook-id}[?select,expand]


Notebooks can expand the sections and sectionGroups properties.

Image or other file resource

Get the binary data of a specific resource.

../resources/{resource-id}/$value


You can find the file's resource URI in the page's output HTML.

For example, an img tag includes endpoints for the original image in the data-fullres-src attribute and the optimized image in the src attribute.

Example

And an object tag includes the endpoint for the file resource in the data attribute.

Example

Note:Getting a collection of resources is not supported.

When you get a file resource, you don't need to include an Accept content type in the request.

For more information about GET requests, see the following resources in the Microsoft Graph API REST reference:

Example GET requests

You can query for OneNote entities and search page content to get just the information you need. The following examples show some ways you can use supported query string options in GET requests to Microsoft Graph.

Remember:

  • All GET requests start with the service root URL.
    Examples: https://www.onenote.com/api/v1.0/me/notes and https://www.onenote.com/api/v1.0/myOrganization/siteCollections/{id}/sites/{id}/notes/

  • Spaces in the URL query string must use %20 encoding.
    Example: filter=title%20eq%20'biology'

  • Property names and OData string comparisons are case-sensitive. We recommend using the OData tolower function for string comparisons.
    Example: filter=tolower(name) eq 'spring'

search & filter

Get all pages that contain the term recipe that were created by a specific app (search is available for consumer notebooks only).

search & select

Get the title, OneNote client links, and contentUrl link for all pages that contain the term golgi app (search is available for consumer notebooks only).

expand

Microsoft Onenote Section Bold

Get all notebooks and expand their sections and section groups.


Get a specific section group and expand its sections and section groups.


Get a page and expand its parent section and parent notebook.

expand (multiple levels)

Get all notebooks and expand their sections and section groups, and expand all sections in each section group.

Note:Expanding parents of child entities or expanding children of parent entities creates a circular reference and is not supported.

expand & select (multiple levels)

Get the name and self link for a specific section group, and get the name and self links for all its sections.


Get the name and self link for all sections, and get the name and created time of each section's parent notebook.


Get the title and ID for all pages, and get the name of the parent section and parent notebook.

expand & levels (multiple levels)

Get all notebooks, sections, and section groups.

filter

Get all sections that were created in October 2014.


Get the pages that were created by a specific app since January 1, 2015.

filter & expand

Get all pages in a specific notebook. The API returns 20 entries by default.


Get the name and pagesUrl link for all sections from the School notebook. OData string comparisons are case-sensitive, so use the tolower function as a best practice.

filter & select & orderby

Get the name and pagesUrl link for all sections that contain the term spring in the section name. Order sections by last modified date.

orderby

Get the first 20 pages ordered by createdByAppId property and then by most recent created time. The API returns 20 entries by default.

search & filter & top

Get the five newest pages created since January 1, 2015 that contain the phrase cell division. The API returns 20 entries by default with a maximum of 100. The default sort order for pages is lastModifiedTime desc (search is available for consumer notebooks only).

search & filter & top & skip

Get the next five pages in the result set (search is available for consumer notebooks only).


And the next five (search is available for consumer notebooks only).

Note:If both search and filter are applied to the same request, the results include only those entities that match both criteria.

select

Get the name, created time, and self link for all sections in the user's notebooks.


Microsoft Onenote Section Bold Text

Get the title, created time, and OneNote client links for a specific page.

select & expand & filter (multiple levels)

Get the name and pagesUrl link for all sections in the user's default notebook.

top & select & orderby

Get the title and self link for the first 50 pages, ordered alphabetically by title. The API returns 20 entries by default with a maximum of 100. The default sort order for pages is lastModifiedTime desc.

skip & top & select & orderby

Get pages 51 to 100. The API returns 20 entries by default with a maximum of 100.

Note:GET requests for pages that retrieve the default number of entries (that is, they don't specify a top expression) return an @odata.nextLink link in the response that you can use to get the next 20 entries.

Supported OData query string options

When sending GET requests to Microsoft Graph, you can use OData query string options to customize your query and get just the information you need. They can also improve performance by reducing the number of calls to the service and the size of the response payload.

Note:For readability, the examples in this article don't use the %20 percent-encoding required for spaces in the URL query string: filter=isDefault%20eq%20true

Query optionExample and description
count

count=true

The count of entities in the collection. The value is returned in the @odata.count property in the response.

expand

expand=sections,sectionGroups

The navigation properties to return inline in the response. The following properties are supported for expand expressions:
- Pages: parentNotebook, parentSection
- Sections: parentNotebook, parentSectionGroup
- Section groups: sections, sectionGroups, parentNotebook, parentSectionGroup
- Notebooks: sections, sectionGroups

By default, GET requests for pages expands parentSection and select the section's id, name, and self properties. Default GET requests for sections and section groups expand both parentNotebook and parentSectionGroup, and select the parents' id, name, and self properties.

Can be used for a single entity or a collection.
Separate multiple properties with commas.
Property names are case-sensitive.

filter

filter=isDefault eq true

A Boolean expression for whether to include an entry in the result set. Supports the following OData operators and functions:
- Comparison operators: eq, ne, gt, ge, lt, le
- Logical operators: and, or, not
- String functions: contains, endswith, startswith, length, indexof, substring, tolower, toupper, trim, concat

Property names and OData string comparisons are case-sensitive. We recommend using the OData tolower function for string comparisons.
Example: filter=tolower(name) eq 'spring'

orderby

orderby=title,createdTime desc

The properties to sort by, with an optional asc (default) or desc sort order. You can sort by any property of the entity in the requested collection.

The default sort order for notebooks, section groups, and sections is name asc, and for pages is lastModifiedTime desc (last modified page first).

Separate multiple properties with commas, and list them in the order that you want them applied. Property names are case-sensitive.

search

search=cell div

Available for consumer notebooks only.

The term or phrase to search for in the page title, page body, image alt text, and image OCR text. By default, search queries return results sorted by relevance.

OneNote uses Bing full-text search to support phrase search, stemming, spelling forgiveness, relevance and ranking, word breaking, multiple languages, and other full-text search features. Search strings are case-insensitive.

Applies only to pages in notebooks owned by the user. Indexed content is private and can only be accessed by the owner. Password-protected pages are not indexed. Applies only to the pages endpoint.

select

select=id,title

The properties to return. Can be used for a single entity or for a collection. Separate multiple properties with commas. Property names are case-sensitive.

skip

skip=10

The number of entries to skip in the result set. Typically used for paging results.

top

top=50

The number of entries to return in the result set, up to a maximum of 100. The default value is 20.

Microsoft Graph also provides the pagelevel query string option you can use to get the level and order of pages within the parent section. Applies only to queries for pages in a specific section or queries for a specific page.

Examples

  • GET ../sections/{section-id}/pages?pagelevel=true
  • GET ../pages/{page-id}?pagelevel=true

Supported OData operators and functions

Microsoft Graph supports the following OData operators and functions in filter expressions. When using OData expressions, remember:

  • Spaces in the URL query string must be replaced with the %20 encoding.
    Example:filter=isDefault%20eq%20true

  • Property names and OData string comparisons are case-sensitive. We recommend using the OData tolower function for string comparisons.
    Example:filter=tolower(name) eq 'spring'

Comparison operatorExample
eq
(equal to)
createdByAppId eq '{app-id}'
ne
(not equal to)
userRole ne 'Owner'
gt
(greater than)
createdTime gt 2014-02-23
ge
(greater than or equal to)
lastModifiedTime ge 2014-05-05T07:00:00Z
lt
(less than)
createdTime lt 2014-02-23
le
(less than or equal to)
lastModifiedTime le 2014-02-23

Logical operatorExample
andcreatedTime le 2014-01-30 and createdTime gt 2014-01-23
orcreatedByAppId eq '{app-id}' or createdByAppId eq '{app-id}'
notnot contains(tolower(title),'school')

| String function | Example | |------|------| | contains | `contains(tolower(title),'spring')` | | endswith | `endswith(tolower(title),'spring')` | | startswith | `startswith(tolower(title),'spring')` | | length | `length(title) eq 19` | | indexof | `indexof(tolower(title),'spring') eq 1` | | substring | `substring(tolower(title),1) eq 'spring'` | | tolower | `tolower(title) eq 'spring'` | | toupper | `toupper(title) eq 'SPRING'` | | trim | `trim(tolower(title)) eq 'spring'` | | concat | `concat(title,'- by MyRecipesApp') eq 'Carrot Cake Recipe - by MyRecipesApp'` |

OneNote entity properties

The filter, select, expand, and orderby query expressions can include properties of OneNote entities.

Example

../sections?filter=createdTime ge 2015-01-01&select=name,pagesUrl&orderby=lastModifiedTime desc

Property names are case-sensitive in query expressions.

For the list of properties and property types, see the following resources in the Microsoft Graph API REST reference:

The expand query string option can be used with the following navigation properties:

  • Pages: parentNotebook, parentSection
  • Sections: parentNotebook, parentSectionGroup
  • Section groups: sections, sectionGroups, parentNotebook, parentSectionGroup
  • Notebooks: sections, sectionGroups

Request and response information for GET requests

Request dataDescription
ProtocolAll requests use the SSL/TLS HTTPS protocol.
Authorization header

Bearer {token}, where {token} is a valid OAuth 2.0 access token for your registered app.

If missing or invalid, the request fails with a 401 status code. See Authentication and permissions.

Accept header

application/json for OneNote entities and entity sets

text/html for page content


Response dataDescription
Success codeA 200 HTTP status code.
Response bodyAn OData representation of the entity or entity set in JSON format, the page HTML, or file resource binary data.
ErrorsIf the request fails, the API returns errors in the @api.diagnostics object in the response body.
X-CorrelationId headerA GUID that uniquely identifies the request. You can use this value along with the value of the Date header when working with Microsoft support to troubleshoot issues.

Constructing the Microsoft Graph notes service root URL

The Microsoft Graph notes root URL uses the following format for all calls to Microsoft Graph notes:

https://graph.microsoft.com/{version}/me/onenote/

The version segment in the URL represents the version of Microsoft Graph that you want to use. Use v1.0 for stable production code. Use beta to try out a feature that's in development. Features and functionality in beta may change, so you shouldn't use it in your production code.

Microsoft Onenote Section Bold Style

Use me for OneNote content that the current user can access (owned and shared). Use users/{id} for OneNote content that the specified user (in the URL) has shared with the current user. Use Microsoft Graph to get user IDs.

Permissions for GET requests

To get OneNote content or structure, you'll need to request appropriate permissions.

The following scopes allow GET requests to Microsoft Graph. Choose the lowest level of permissions that your app needs to do its work.

Choose from:

  • Notes.read
  • Notes.ReadWrite
  • Notes.ReadWrite.All

For more information about permission scopes and how they work, see Microsoft Graph permissions reference.

See also

The Ultimate Guide to
OneNote

Here’s a bold yet true declaration: OneNote is the most versatile tool in Office 365. Whether you’re a busy parent making a shopping list, a software developer providing notes to a project manager, or a sixth-grade teacher assigning a collaborative class project, OneNote can make your life easier.

We rounded up ten of our favorite OneNote tips that will make you a OneNote ninja in no time!

1. Pull Text Out of Images in OneNote


The Copy Text from Picture feature in OneNote 2013/2016 allows you to pull the text out from an image onto your clipboard, so you can paste and use the text anywhere.

2. Make and Share Shopping Lists in OneNote

Microsoft Onenote Section Bold

If you need to get more organized with your shopping lists, OneNote can help. It offers a way to create a shared shopping list using to do tags that makes keeping track of your necessary items easy, even when you’re sharing the responsibility among multiple people.

3. Capture Audio and Video With OneNote


Did you know you can record audio and video with OneNote–as in, you don’t have to use an external tool and then embed the file into your OneNote page? (Although, of course, you can do that if that is your preference.) The video above will demonstrate how to create both an audio recording and a video recording right from OneNote 2013/2016.

4. Easily Embed an Excel Spreadsheet in OneNote


OneNote allows you to insert all kinds of information into notebooks, including other Office files. Adding an Excel spreadsheet to your OneNote page is a great way to create a copy of your Excel data to view in OneNote, so you don’t have to switch back and forth between applications.

Microsoft Onenote Section Bold Font

5. Use OneNote to Take Awesome Meeting Notes


We’ve already looked at OneNote as a useful tool for creating to-do lists (and shopping lists) and working with other kinds of files. This video tip centers around another way to use OneNote to improve an unavoidable corporate task: meeting minutes.

6. Email Your OneNote Notes Page With One Click


OneNote makes sharing easy–and not just sharing via OneDrive. Integrated right into the OneNote ribbon is the Email Page button, which instantly creates an email with your notes in the body. As you’ll see in the video above, if you have any associated details like attachments or meeting attendees, OneNote ensures that your email captures those details too.

7. Take Screenshots With OneNote


OneNote 2013/2016 is the Swiss Army knife of note-taking, able to capture all different types of information and add it to a page. OneNote is not only able to handle images with ease, it can also actually take screenshots or screen clippings to insert into your notes.

8. Link in OneNote: Three Ways


OneNote 2013/2016 provides multiple ways to add links to to your notebook pages, so you can link to the web, other files, and even other locations in a OneNote notebook. Take a look at the video above to see a demonstration of linking to the web, or follow the link in the heading to see two additional linking methods.

9. Change the Default Font Type and Size in OneNote


We always recommend changing the default settings of any Office application to your preferences, which can save a lot of time (and annoyance!). In the video above, you’ll see a quick demo of changing the font settings for OneNote 2013/2016.

10. Password-Protect OneNote Sections


In OneNote 2013/2016, you’re able to password-protect individual sections, so if you’re sharing with colleagues, family members, or students, only those with the set password will be able to access the section.