https://github.com/finickyflame/ms-graph-samples
Samples applications using the Microsoft Graph Sdk and Dotnet 7
https://github.com/finickyflame/ms-graph-samples
Last synced: 5 days ago
JSON representation
Samples applications using the Microsoft Graph Sdk and Dotnet 7
- Host: GitHub
- URL: https://github.com/finickyflame/ms-graph-samples
- Owner: Finickyflame
- License: mit
- Created: 2023-07-11T03:40:59.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-11T15:39:21.000Z (almost 3 years ago)
- Last Synced: 2025-03-03T07:14:17.184Z (over 1 year ago)
- Language: C#
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Microsoft Graph samples
Samples applications using the Microsoft Graph Sdk and Dotnet 7
## Prerequisites
- [.NET 7 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/7.0)
- [Visual Studio 2022](https://visualstudio.microsoft.com/vs/), [Visual Studio Code](https://code.visualstudio.com/) or [Rider](https://www.jetbrains.com/rider/)
## Projects
- [ConsoleApp](./src/ConsoleApp)
## How to debug
### 1. Restore projects
```bash
dotnet restore
```
### 2. Update appsettings.json with your own Tenant, Client and Secret Ids
```json
{
"AzureAd": {
"Instance": "https://login.microsoftonline.com/",
"TenantId": "00000000-0000-0000-0000-000000000000",
"ClientId": "00000000-0000-0000-0000-000000000000",
"ClientCredentials": [
{
"SourceType": "ClientSecret",
"ClientSecret": "00000000-0000-0000-0000-000000000000-"
}
]
}
}
```
See [Quickstart: Register an application with the Microsoft identity platform](https://learn.microsoft.com/en-ca/azure/active-directory/develop/quickstart-register-app) for more details on how to register an app on Azure Active Directory.
Your registered application in Azure will need both `User.ReadWrite.All` and `Tasks.ReadWrite.All` permissions in order for this executable to work properly.
### 3. Run the application
```bash
dotnet run
```
## Links
- [Microsoft Graph REST API v1.0 endpoint reference](https://learn.microsoft.com/en-us/graph/api/overview?view=graph-rest-1.0)
- [Daemon app that calls web APIs - app registration](https://learn.microsoft.com/en-us/azure/active-directory/develop/scenario-daemon-app-registration)
- [Azure Samples - Daemon](https://github.com/Azure-Samples/active-directory-dotnetcore-daemon-v2/tree/master)