Share via

i am trying to create a task List using Graph API

Isha Keshri 0 Reputation points
2023-05-10T12:38:39.8+00:00
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();

TodoTaskList todoTaskList = new TodoTaskList();
todoTaskList.displayName = "Travel items";

graphClient.me().todo().lists().buildRequest()
		.post(todoTaskList));

I have the following code given in their documentation but i am getting error

Error as follow:-

May 10, 2023 4:23:56 PM com.microsoft.graph.logger.DefaultLogger logError

SEVERE: CoreHttpProvider[sendRequestInternal] - 408Graph service exception

May 10, 2023 4:23:56 PM com.microsoft.graph.logger.DefaultLogger logError

SEVERE: Throwable detail: com.microsoft.graph.http.GraphServiceException: Error code: UnknownError

Error message:

POST https://graph.microsoft.com/v1.0/me/todo/lists

SdkVersion : graph-java/v5.42.0

SdkVersion : graph-java/v5.42.0

[...]

401 : Unauthorized

Microsoft Security | Microsoft Graph
0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.