microsoftgraph / microsoftgraph/msgraph-sdk-dotnet

[Client bug]: CalendarView for specific calendar does not have $expand functionality

Open
#2,358 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug: metadata OpenApi
Dominant language
C#
Stars
789
Forks
264
Avg merge
15h 17m
Merged PRs (30d)
3

Description

Describe the bug
Microsoft Graph API has an ability to use $expand funcitonality for your own calendarView:

var response = await graphClient.Me.CalendarView
    .GetAsync(
        r =>
        {
            r.QueryParameters.StartDateTime = s.ToString();
            r.QueryParameters.EndDateTime = e.ToString();
            r.QueryParameters.Expand = new[] { "..." };
        });

However this is not going to work if we use

var response = await graphClient.Me.Calendar.CalendarView
    .GetAsync(
        r =>
        {
            r.QueryParameters.StartDateTime = s.ToString();
            r.QueryParameters.EndDateTime = e.ToString();
            r.QueryParameters.Expand = new[] { "..." }; // Expand is not recognized
        });

Expected behavior
$expand should be accessible for both CalendarView and Calendar.CalendarView and similar routes like Calendar[id].CalendarView

Client version
5.42.0

Desktop (please complete the following information):

  • OS: W11

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the generated request builders for Me.CalendarView and Me.Calendar.CalendarView, then check the equivalent Calendar[id].CalendarView route. Reproduce the C# examples with client version 5.42.0 and verify that $expand is exposed and accepted for each route.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.