Last active
October 12, 2023 09:01
-
-
Save waldekmastykarz/207c47910e8c0a59e044a7ef8f455754 to your computer and use it in GitHub Desktop.
Build Microsoft Graph connector article - ConnectionConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Text.Json; | |
using Microsoft.Graph.Models; | |
using Microsoft.Graph.Models.ExternalConnectors; | |
static class ConnectionConfiguration | |
{ | |
public static ExternalConnection ExternalConnection | |
{ | |
get | |
{ | |
return new ExternalConnection | |
{ | |
Id = "waldekblogdotnet", | |
Name = "Waldek Mastykarz (blog); .NET", | |
Description = "Tips and best practices for building applications on Microsoft 365 by Waldek Mastykarz - Microsoft 365 Cloud Developer Advocate", | |
// [...] trimmed for brevity | |
}; | |
} | |
} | |
public static Schema Schema | |
{ | |
get | |
{ | |
return new Schema | |
{ | |
BaseType = "microsoft.graph.externalItem", | |
Properties = new() | |
{ | |
new Property | |
{ | |
Name = "title", | |
Type = PropertyType.String, | |
IsQueryable = true, | |
IsSearchable = true, | |
IsRetrievable = true, | |
Labels = new() { Label.Title } | |
}, | |
// [...] trimmed for brevity | |
} | |
}; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment