I tried to reproduce the same in my environment via Postman and got the below results:
In my Azure AD application, I granted API permissions
like below:

I got the access token using client credentials with parameters like below:
POST https://login.microsoftonline.com/<TenantID>/oauth2/v2.0/token
client_id:my_appID
grant_type:client_credentials
scope:https://graph.microsoft.com/.default
client_secret:my_client_secret
Response:

When I tried to create a notebook with above token, I got same error as below:
POST https://graph.microsoft.com/v1.0/me/onenote/notebooks
Content-type: application/json
{
"displayName": "My Test notebook"
}
Response:

Please note that, client credentials flow doesn't require signed-in user (no user interaction) and generates token on behalf of all users in application.
When you use /me
in the request, it could not identify that specific user among all users. So, we cannot use /me
endpoint with client credentials flow.
To resolve the error, you need to use delegated authentication flows like Authorization code flow, ROPC flow etc... that require user to sign in.
As you cannot use Delegated authentication flow in your scenario, you can try below query by replacing /me
with /users/userID
:
POST https://graph.microsoft.com/v1.0/users/<User_ObjectID>/onenote/notebooks
Content-type: application/json
{
"displayName": "My Test notebook"
}
Using the above query, I created new notebook successfully.