Skip to content

Instantly share code, notes, and snippets.

View liliankasem's full-sized avatar
💭
I may be slow to respond.

Lilian Kasem liliankasem

💭
I may be slow to respond.
View GitHub Profile

Introducing the Azure Functions CLI (preview)

We're excited to announce the public preview of the Azure Functions CLI, the next generation of func. It's the same tool you know from Azure Functions Core Tools, rebuilt around a new workload model that makes installing, updating, and running Functions locally faster, smaller, and a lot less fiddly.

What's new

A new name.

Azure Functions Core Tools is becoming the Azure Functions CLI. The command is still func, your projects don't change, and Core Tools v4 keeps shipping.

PRD: Workload Engine for Azure Functions Core Tools v5

Problem Statement

Azure Functions Core Tools today ships every supported language stack — .NET, Node, Python, Java, PowerShell, TypeScript — inside a single, monolithic CLI binary. As a developer using the CLI:

  • I download (and update) a large binary that contains support for languages I will never use.
  • Adding support for a new stack requires a full Core Tools release, even when nothing in the core CLI actually changed.
  • I cannot pin the version of language-specific tooling (templates, project initialization rules, packaging behavior) independently from the version of the CLI itself.
  • As a workload owner (a team that maintains support for one stack), I cannot ship fixes or new templates on my own cadence — I am gated on a Core Tools release and on the Core Tools team's review bandwidth.

On-Behalf-Of (OBO) Flow with Azure Functions and Easy Auth

This guide explains how to configure the On-Behalf-Of (OBO) flow to call Microsoft Graph on behalf of authenticated users from an Azure Functions MCP server.

Overview

The OBO flow allows your Azure Function to:

  1. Accept an authenticated user's token via Easy Auth
  2. Exchange that token for a new token scoped to Microsoft Graph
"4.103.0": {
"templates": "https://functionscdn.azureedge.net/public/TemplatesApi/3.1.1648.zip",
"workerRuntimes": {
"dotnet": {
"net6": {
"displayInfo": {
"displayName": ".NET 6.0",
"hidden": true,
"displayVersion": "v4",
"targetFramework": ".NET",
@liliankasem
liliankasem / azdo-secret.yml
Created August 19, 2021 19:48
I forgot my secret, whoops
- powershell: |
$secret = $env:SECRET
Write-Host "mySecretVariable:"
$secret.ToCharArray()
env:
SECRET: $(mySecretVariable)
@liliankasem
liliankasem / script.sh
Last active April 3, 2021 16:55
Bash script example arguments / flags
#!/bin/bash
opts_count=0
while getopts g:n: flag
do
case "${flag}" in
g) greeting=${OPTARG}; ((opts_count=opts_count+1)) ;;
n) name=${OPTARG}; ((opts_count=opts_count+1)) ;;
*) echo "Unknown parameter passed"; exit 1 ;;
esac
@liliankasem
liliankasem / arm.json
Created April 3, 2021 16:34
IoT Hub Conditional Routes
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "string",
"metadata": {
"description": "The datacenter to use for the deployment."
}
},
@liliankasem
liliankasem / pipeline.yml
Created April 1, 2021 21:17
Azure DevOps Variable Imports
trigger: none
# Test 1: Import vars file at global level
# Pass: job environment set to 'lilian'
variables:
- template: vars.yml
stages:
- stage: Hello
displayName: 'Stage one'
@liliankasem
liliankasem / setup_config.sh
Created April 7, 2020 14:43
Bash script that uses key-value to assign arguments to variables
#!/bin/bash
# Loop through all the arguments and assign them to a variable
for ARGUMENT in "$@"
do
KEY=$(echo $ARGUMENT | cut -f1 -d=)
VALUE=$(echo $ARGUMENT | cut -f2 -d=)
case "$KEY" in
WORKING_DIR) working_dir=${VALUE} ;;