Laravel Developer
David Carr
Web Developer
All Posts Archives Categories Authors
About Books Packages Templates Contact
Blog
All Posts Archives Categories Authors
About Books Packages Templates Contact
Laravel Microsoft Graph
Laravel Packages
Laravel Microsoft Graph Laravel Xero Laravel Sent Emails Laravel Dropbox Laravel Box Laravel Companies House Laravel Countries Laravel Eventbrite Laravel Blade Components
PHP Packages
PDO Wrapper PHP find and replace JSON SQL Import IMAP Export CSV Pagination
v3 v4
Navigation
  • Introduction
  • Install
  • Delta
  • MsGraph
    • Is Connected
    • Disconnect
    • Middleware
    • Queues
    • Login with MsGraph
    • Contacts
    • Emails
    • Files
    • Filesystem
  • MsGraph Admin
    • Middleware
    • Contacts
    • Emails
Navigation
  • Introduction
  • Install
  • Delta
  • MsGraph
    • Is Connected
    • Disconnect
    • Middleware
    • Queues
    • Login with MsGraph
    • Contacts
    • Emails
    • Files
    • Filesystem
  • MsGraph Admin
    • Middleware
    • Contacts
    • Emails

Delta

Delta Function From Microsoft Documentation:

A delta function call for messages in a folder is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the messages in that folder. This allows you to maintain and synchronize a local store of a user's messages without having to fetch the entire set of messages from the server every time.

Use Cases

You can use the delta method, if you want fast response time, and fetch only the messages (emails) has been recently modified, or created.

You can use the feature as follows

Before:

$emails = MsGraph::emails()->get(...)

Now:

$emails = MsGraph::emails()->delta(?bool $delta = true)->get(...)

Also this can be used with MsGraphAdmin

$emails = MsGraphAdmin::emails()->delta(?bool $delta = true)->get(...)

Query Params:

Query parameter Type Description
$deltatoken string A state token returned in the @odata.deltaLink URL of the previous delta function call for the same message collection, indicating the completion of that round of change tracking. Save and apply the entire @odata.deltaLink URL including this token in the first request of the next round of change tracking for that collection.
$skiptoken string A state token returned in the @odata.nextLink URL of the previous delta function call, indicating there are further changes to be tracked in the same message collection.
changeType string A custom query option to filter the delta response based on the type of change. Supported values are created, updated, or deleted.

Limitation

  • $search Query Param is not supported
  • $filter only works with $filter=receivedDateTime+ge+{value} or $filter=receivedDateTime+gt+{value}
  • $orderby only supports $orderby=receivedDateTime+desc

References

For more info, about the API. Check: https://learn.microsoft.com/en-us/graph/api/message-delta?view=graph-rest-1.0&tabs=php

Table of Contents
    • Delta Function From Microsoft Documentation:
  • Use Cases
  • Query Params:
  • Limitation
  • References

DCBlog

Practical tutorials, code snippets, and in-depth guides for modern web development. Helping developers build better applications since 2009.

Subscribe to my newsletter for the latest updates on my books and digital products.

© 2009 - 2025 DC Blog. All rights reserved.

Privacy Policy • Terms of Service