with microsoft graph create group , after create notebook (onenote) in group directory.
first execute http call :
post /groups
with required access token in header , json object of group in body. (http://graph.microsoft.io/en-us/docs/api-reference/beta/api/group_post_groups). if successful return json object complete property of group.
so far there no problem, i've managed {id} (in guid) of group required create notebook. let's example {id} of group 123456789-abcd-4321-bbbb-9876543210aaa
next notebook execute http call :
post /groups/{id}/notes/notebooks
and got following json response :
"error": { "code": "20160", "message": "no modern group found matches id 123456789-abcd-4321-bbbb-9876543210aaa", "innererror": { "request-id": "85b85297-ad3b-424d-b18f-2b1da904f5fc", "date": "2016-01-29t08:19:27" }
i've tried many things workaround issue. 1 time set break point between method create group , method create notebook in program. ran program until point has finished creating group. stop, , try open notebook tab office365 website in browser , found :
in english means "we creating notebook. may take few minutes. finish if close browser". took 10 seconds before redirected onenote online page (the url sharepoint tenant name).
after continue program , created notebook.
i need here! need create notebook after creating group without having open browser. think has sharepoint sites creation group.
any appreciated!
creating groups take time (usually ~ 5 minutes). recommended first query see if group has been created or not , create notebook.
you can query drive endpoint find if group has been provisioned. /beta/groups/{id}/drive
Comments
Post a Comment