This console application demonstrates how to make Delta Query calls to the Graph API, allowing applications to request only changed data from Microsoft Graph tenants.
The sample uses a application-only permission, however delegated-permissions should also work.
To run this sample you will need:
- Visual Studio 2015
- .Net 4.5
- An Internet connection
- An Azure Active Directory (Azure AD) tenant. For more information on how to get an Azure AD tenant, please see How to get an Azure AD tenant
From your shell or command line:
git clone https://github.com/microsoftgraph/ConsoleApp-DeltaQuery-DotNet
Using MSAL 1.Before you can get a token from Azure AD v2.0 or Azure AD B2C, you'll need to register an application(https://apps.dev.microsoft.com/). For Azure AD v2.0, use the app registration portal. For Azure AD B2C, checkout how to register your app with B2C. 2. Find the Application ID value and copy it to the clipboard. 3. Configure Permissions for your application - select 'Read Directory Data'. 4. Set a platform by clicking Add Platform, select Native.
-
In Solution Explorer, select the App.config project.
a. For the
AppPrincipalId
key, replaceTo be filled in
with the application ID of your registered Azure application.b. For the
AppPrincipalPassword
key, replaceTo be filled in
with the key of your registered Azure application.c. For the
TenantDomainName
key, replaceTo be filled in
with domain name of your organization.d. For the
EntitySet
key , you can use delta query supported MS-graph entities e.gusers
,groups
etc. as value.
If you'd like to contribute to this sample, see CONTRIBUTING.MD.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
We'd love to get your feedback about the Microsoft Graph Webhooks sample using WebJobs SDK. You can send your questions and suggestions to us in the Issues section of this repository.
Questions about Microsoft Graph in general should be posted to Stack Overflow. Make sure that your questions or comments are tagged with [MicrosoftGraph].
If you have a feature suggestion, please post your idea on our User Voice page, and vote for your suggestions there.
- AAD DQ sample
- Working with Delta Query in Microsoft Graph
- Microsoft Graph developer site
- Call Microsoft Graph in an ASP.NET MVC app
- MSAL Sample
Copyright (c) 2017 Microsoft Corporation. All rights reserved.