User Profile
Jagrati_Gupta
Copper Contributor
Joined Aug 01, 2023
User Widgets
Recent Discussions
Re: Unable to Map Planner Task Checklists in Microsoft Teams Planner Using Microsoft Graph API
Hello LeonPavesic , I am currently working on a project where I need to create checklists in Planner tasks using the Graph API SDK in C#. I've encountered an issue while attempting to achieve this goal, and I'm seeking assistance to clarify a few points and resolve the problem. Problem Description: I am trying to create checklists in already created tasks using the Graph API SDK in C#. I am trying to use this graph API for 2 cases: await graphClient.Planner.Tasks["{plannerTask-id}"].PatchAsync(requestBody, (requestConfiguration) => { requestConfiguration.Headers.Add("Prefer", "return=representation"); requestConfiguration.Headers.Add("If-Match", "W/\"JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBAWCc=\""); }); I have attempted two methods: 1st Way: I tried to update the task details of an already created task with the details property set to NULL. 2nd Way: I attempted to update the name of a checklist within an already created task with checklists added to it. In both cases, I am receiving the same exception: Microsoft.Graph.ServiceException HResult=0x80131500 Message=Message: The request is invalid: Value cannot be null. Parameter name: qualifiedName Questions: Is it the correct approach to create checklists in tasks when the details property is NULL? Why am I getting the same exception in both cases, whether the details property is NULL or not? Could you please confirm if there is any way to create checklists using the Graph API in C# with the details property set to NULL? If yes, could you provide implementation details or code examples? I appreciate any insights or guidance you can provide to help me resolve this issue. Thank you in advance for your assistance!1KViews0likes0CommentsNeed Help Updating Planner Task Details Using Microsoft Graph SDK in C#
Hello everyone, I am facing challenges while trying to update Planner task details using the Microsoft Graph SDK in C#. I have followed the official documentation (https://learn.microsoft.com/en-us/graph/api/plannertaskdetails-update?view=graph-rest-1.0&tabs=csharp#request-headers) , but I'm encountering issues with the provided methods. Here are the details of the problem: 1. Using PatchAsync: The method PatchAsync mentioned in the documentation is not available in the Graph SDK version 4.44.4 that I'm using. I get a compile-time error when attempting to use this method. graphClient.Planner.Tasks[task.Id].Details.Request(headers).PatchAsync(requestBody); 2. Using PutAsync: I tried using the PutAsync method, but I received the following error: Microsoft.Graph.ServiceException Message: No HTTP resource was found that matches the request URI 'https://tasks.office.com:444/taskapi/V3.0/tasks({task-Id})/details'. 3. Using CreateAsync and UpdateAsync: I attempted to use CreateAsync and UpdateAsync methods, but encountered errors related to routing conventions and null values in the request. Here is how I am constructing the request: Headers: var headers = new List<HeaderOption> { new HeaderOption("Prefer", "return=representation"), new HeaderOption("If-Match", TaskETag) }; Request Body: var requestBody = new PlannerTaskDetails { Checklist = new PlannerChecklistItems { AdditionalData = new Dictionary<string, object> { { check.Key , new { OdataType = "microsoft.graph.plannerChecklistItem", Title = check.Value.Title, IsChecked = check.Value.IsChecked, } } }, }, }; I am seeking guidance on how to properly update task details in Planner using the Microsoft Graph SDK in C#. My goal is to create checklists as Team 1 in Team 2. Any help or insights on how to resolve this issue would be greatly appreciated. Thank you in advance for your assistance!775Views0likes0CommentsIssue Retrieving File Content from SharePoint Using Microsoft Graph API - Seeking Resolution
Hello Microsoft Tech Community, I am facing a problem while attempting to retrieve the content of a file saved on SharePoint using the Microsoft Graph API. I have tried multiple approaches, but unfortunately, I am encountering errors. Approach 1: var fileContentStream = await graph.Shares[drive.WebUrl].DriveItem.Content .Request() .GetAsync(); Error: "Resource not found." Approach 2: var fileContentStream = await graph.Drives[drive.ParentReference.Id] .Root .Request() .GetAsync(); Error: "Malformed drive.ParentReference.Id." Approach 3: var fileContentStream = await graph.Groups[groupId] .Drives[drive.ParentReference.Id] .Items[drive.Id] .Content .Request() .GetAsync(); Error: "Malformed drive.Id." It's worth noting that the file I am attempting to access is confirmed to exist on SharePoint and is accessible through the SharePoint interface. I have verified the correctness of the drive.Id and drive.ParentReference.Id with the file saved on SharePoint, and they match. I would appreciate any insights, guidance, or solutions the community can provide to help resolve this issue. Thank you in advance for your assistance.428Views0likes0CommentsUnable to Map Planner Task Checklists in Microsoft Teams Planner Using Microsoft Graph API
Dear Microsoft Community, I am currently working on a project where I am utilizing the Microsoft Teams Planner API via Microsoft Graph to manage tasks. I have successfully mapped tasks using Microsoft.Graph.IPlannerTasksCollectionPage which works perfectly for tasks. However, I am facing challenges in mapping checklists associated with Planner tasks. I have explored the Microsoft Graph API documentation and various resources, but I am unable to find an equivalent interface like IPlannerTasksCollectionPage for checklists. I need to understand how to retrieve and map Planner task checklists in a similar structured manner to tasks. Here are my specific questions: Is there an equivalent of IPlannerCheckListCollectionPage in Microsoft Graph API for Planner task checklists? I am looking for a collection page interface or any other approach to efficiently retrieve and map checklists associated with Planner tasks. This will help in managing and displaying checklists in our application. What is the recommended method for mapping checklists associated with Planner tasks? If there isn't a specific collection page interface for checklists, could you please guide me on the best practices or recommend an alternative method to efficiently retrieve and map Planner task checklists? I appreciate any assistance or guidance you can provide regarding this issue. Your support will greatly help me in moving forward with my project. Thank you in advance for your time and expertise!1.4KViews0likes2CommentsUnable to identify folders and files using Microsoft graph API - seeking resolution
Hello Microsoft Teams community, I'm encountering an issue with the Microsoft Teams Graph API (version 4.44) while working in a custom team. In the files section, while trying to add files, I am facing unexpected behaviour where the folder type is returning as not null, and the file type is returning as null for both folders and files. According to the API documentation, the expected behaviour should be the opposite: folder type should be null, and file type should be not null. As per Microsoft documentation: https://learn.microsoft.com/en-us/onedrive/developer/rest-api/resources/driveitem?view=odsp-graph-online Has anyone else experienced this issue in their custom teams using Graph API v4.44? If so, how did you resolve it? I've already tried the following troubleshooting steps: 1. Double-checked the API version to ensure I'm using v4.44. 2. Verified that the permissions for the API are set correctly. 3. Cleared cache and re-authenticated the API calls. Despite these efforts, the problem persists. I suspect it might be a bug or a configuration issue. Any insights or suggestions on how to troubleshoot and resolve this issue would be greatly appreciated. Thank you in advance for your help!842Views0likes2Comments
Recent Blog Articles
No content to show