Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot request events delta without startDateTime #321

Open
AntoineMarques opened this issue Sep 6, 2024 · 1 comment
Open

Cannot request events delta without startDateTime #321

AntoineMarques opened this issue Sep 6, 2024 · 1 comment
Labels
dependency:metadata Awaiting fix from core dependency project module ToTriage type:bug A broken experience

Comments

@AntoineMarques
Copy link

Describe the bug

Event delta documentation says param startDateTime is optional when working with calendars but class DeltaRequestBuilder always include it in template url causing call to fail with ODataError.

Expected behavior

When performing a normal call without any optional param to get a full delta, no error should append.

How to reproduce

$client->me()
->calendars()
->byCalendarId($remoteId)
->events()
->delta()
->get(
    new DeltaRequestBuilderGetRequestConfiguration([
        'Prefer' => sprintf('outlook.timezone="%s"', $local->getTimeZone()->getName())
    ])
)
->wait()

SDK Version

2.8.0

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

{
    "error": {
        "code": "ErrorInvalidParameter",
        "message": "The value '' of parameter 'StartDateTime' is invalid."
    }
}

Configuration

No response

Other information

No response

@AntoineMarques AntoineMarques added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Sep 6, 2024
@Ndiritu
Copy link
Contributor

Ndiritu commented Sep 30, 2024

Thank you for reporting this @AntoineMarques

As a temporary workaround, please consider using the withUrl() method to override the request URL:

$client->me()
->calendars()
->byCalendarId($remoteId)
->events()
->delta()
->withUrl('https://graph.microsoft.com/beta/me/calendar/id/events/delta')
->get(
    new DeltaRequestBuilderGetRequestConfiguration([
        'Prefer' => sprintf('outlook.timezone="%s"', $local->getTimeZone()->getName())
    ])
)
->wait()

Also, noted that this is a feature on the Beta Graph API and the Microsoft Graph Beta SDK should receive these preview updates soon

@Ndiritu Ndiritu added dependency:metadata Awaiting fix from core dependency project module and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned labels Sep 30, 2024
@Ndiritu Ndiritu transferred this issue from microsoftgraph/msgraph-sdk-php Sep 30, 2024
@Ndiritu Ndiritu removed the ToTriage label Sep 30, 2024
@Ndiritu Ndiritu removed the ToTriage label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency:metadata Awaiting fix from core dependency project module ToTriage type:bug A broken experience
Projects
None yet
Development

No branches or pull requests

2 participants