Skip to content

Instantly share code, notes, and snippets.

@waldekmastykarz
Last active October 12, 2023 09:01
Show Gist options
  • Save waldekmastykarz/207c47910e8c0a59e044a7ef8f455754 to your computer and use it in GitHub Desktop.
Save waldekmastykarz/207c47910e8c0a59e044a7ef8f455754 to your computer and use it in GitHub Desktop.
Build Microsoft Graph connector article - ConnectionConfiguration.cs
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