Skip to content

Instantly share code, notes, and snippets.

View garrytrinder's full-sized avatar
👨‍💻
CLI for Microsoft 365

Garry Trinder garrytrinder

👨‍💻
CLI for Microsoft 365
View GitHub Profile
@garrytrinder
garrytrinder / challenge.md
Created March 12, 2025 10:07
Challenge project - Chat with your external data ingested to Microsoft 365

Introduction

Use declarative agents to extend Microsoft 365 Copilot. You ingest external content to Microsoft 365 and create agents that use that content to answer questions authoritatively.

Example scenario

Suppose you have an external system where you store knowledge base articles. These articles contain information about different processes in your organization. You want to be able to easily find and discover relevant information from Microsoft 365. You also want Microsoft 365 Copilot to include information from these knowledge base articles in its responses.

What will we be doing?

@garrytrinder
garrytrinder / challenge.md
Last active March 12, 2025 18:46
Challenge project - Build a declarative agent to chat with your data

Introduction

Using agents you create AI-powered assistants optimized for specific scenarios in Microsoft 365 Copilot. With instructions, you define the context for the agent and specify settings such as tone of voice or how it should respond. By configuring the agent's skills, you give it the ability to interact with external systems, trigger certain behavior under system conditions, or use custom workflow logic. One type of skill is actions that allow a declarative agent to communicate with APIs both for retrieving and modifying data.

Example scenario

Suppose you work in the sales department for Northwind Traders. You regularly need to check the status of orders and customers. You want to be able to quickly see what orders are pending, but also consider customer details in case you have questions. The Northwind Traders API exposes their data via an API. Rather than building a separate app, you want to build an agent for Microsoft 365 Copilot so that you can easily find the available orders and custom

@garrytrinder
garrytrinder / challenge.md
Created March 11, 2025 14:53
Challenge project - Build a declarative agent to chat with your docs

Introduction

Use declarative agents to extend Microsoft 365 Copilot. You define custom knowledge to create agents that can answer questions using authoritative content.

Example scenario

Suppose you work in a customer support team. You and your team handle queries about products that your organization makes from customers. You want to improve response times and provide a better experience. You store documents in a document library on a SharePoint Online site that contains product specifications, frequently asked questions, and policies for handling repairs, returns, and warranties. You want to be able to use natural language to query information in these documents and get answers quickly to customer queries.

What will we be doing?

@garrytrinder
garrytrinder / new-errors.json
Created August 28, 2024 10:07
Code snippets for Dev Proxy 0.20 release announcement
{
"$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.20.0/genericrandomerrorplugin.schema.json",
"errors": [
{
"request": {
"url": "https://jsonplaceholder.typicode.com/*"
},
"responses": [
{
"statusCode": 400,
@garrytrinder
garrytrinder / proxy-stats.mjs
Created June 28, 2024 09:01
Gets total number of Dev Proxy downloads
#!/usr/bin/env zx
// suppress printing command names and output
$.verbose = false;
const token = 'github_pat_'
async function getDownloads() {
let numDownloads = 0;
let page = 1;
const perPage = 30;
@garrytrinder
garrytrinder / Publish-DevProxyToWinget.ps1
Last active December 10, 2024 11:59
This script publishes a new release of Dev Proxy to the Windows Package Manager (winget).
<#
.SYNOPSIS
This script publishes a new release of Dev Proxy to the Windows Package Manager (winget).
.DESCRIPTION
This script creates a new release folder and manifest files for the new version. The script then creates a new branch, commits the changes, and pushes the branch to the remote repository. Finally, the script creates a pull request with the new version information.
.PARAMETER NewVersion
The version number of the new release in semver format.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "array",
"items": {
"type": "object",
"properties": {
"position": {
"type": "string"
},
"value": {
{
"playstyles": [
{
"position": "GK",
"value": "Line Keeper",
"modifiers": [
{
"key": "overall",
"value": 3
},
@garrytrinder
garrytrinder / reset-env-values.ps1
Created November 24, 2023 10:08
Reset Teams Toolkit environment files
param (
[Parameter(Mandatory=$true)]
[string]$Path
)
# Define the files to search for
$filesToSearch = ".env.local", ".env.local.user", ".env.dev", ".env.dev.user"
# Define the keys to ignore
$keysToIgnore = "SPO_HOSTNAME", "SPO_SITE_URL", "APP_NAME_SUFFIX"
@garrytrinder
garrytrinder / remove-sideloaded-teams-apps.ps1
Last active November 24, 2023 09:23
Remove sideloaded Teams apps for the current user
# assumes you are logged into tenant using CLI for Microsoft 365 (https://aka.ms/cli-m365)
$apps = m365 teams user app list --userId "@meId" | ConvertFrom-Json
$apps | Where-Object { $_.teamsApp.distributionMethod -eq "sideloaded" } | ForEach-Object { m365 teams user app remove --id $_.id --userId "@meId" --force }