This file contains hidden or 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
POST graph.microsoft.com/v1.0/$batch | |
{ | |
"requests": [ | |
{ | |
"url": "/me?$select=displayName,jobTitle,userPrincipalName", | |
"method": "GET", | |
"id": "1" | |
}, | |
{ | |
"url": "/me/messages?$filter=importance eq 'high'&$select=from,subject,receivedDateTime,bodyPreview", |
This file contains hidden or 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
// delete all files in the uploads directory | |
const fs = require('fs'); | |
const path = require('path'); | |
// clear directories | |
const adaptiveCards = path.join(__dirname, '../bot/src/adaptiveCards'); | |
const cardActions = path.join(__dirname, '../bot/src/cardActions'); | |
const comamnds = path.join(__dirname, '../bot/src/commands'); | |
[adaptiveCards, cardActions, comamnds].forEach((dir) => { |
This file contains hidden or 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
$notToRemove = @("app1","app2") | |
$apps = m365 teams app list | ConvertFrom-JSON | |
$apps | Where-Object { $_.displayName -notin $notToRemove } | ForEach-Object { m365 aad app remove --appId $_.appId --confirm } |
This file contains hidden or 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
on: [workflow_dispatch] | |
jobs: | |
cli_login_job: | |
runs-on: ubuntu-latest | |
name: CLI Login Job | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: CLI for Microsoft 365 Login |
This file contains hidden or 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
var betas = []; document.querySelectorAll("a.code").forEach((version)=>{ version.innerText.includes("5.0.0-beta") ? betas.push(version.innerText); betas; |
This file contains hidden or 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
# unpack the solution | |
pac solution unpack --zipFile "$((Get-Location).Path)\export\solution.zip" --folder "$pwd\solution" | |
# extract canvas apps | |
$canvasapps = Get-ChildItem -Path .\solution\CanvasApps\* -Include *.msapp | |
$canvasapps | Foreach-Object { | |
pac canvas unpack --msapp $_.FullName --sources "$((Get-Location).Path)\canvasapps\$($_.Name.Split("_")[1])" | |
} |
This file contains hidden or 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
Write-Output "Getting Microsoft To Do task lists ..." | |
$lists = m365 todo list list -o json | ConvertFrom-Json | |
Write-Output "Iterating Microsoft To Do task lists ..." | |
$lists | ForEach-Object { | |
$listId = $_.Id | |
Write-Output "Getting completed tasks from '$($_.displayName)' task list ..." | |
$tasks = m365 todo task list --listId $listId -o json --query '[?status==`completed`]' | ConvertFrom-Json | |
Write-Output "$($tasks.Count) completed tasks found ..." |
This file contains hidden or 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
Write-Output "Getting environment info..." | |
$environment = m365 flow environment list --query '[?contains(displayName,`default`)] .name' | |
Write-Output "Getting Flows info..." | |
$flows = m365 flow list --environment $environment --asAdmin --output json | ConvertFrom-JSON | |
Write-Output "Found $($flows.Count) Flows to export..." | |
$flows | ForEach-Object { | |
Write-Output "Exporting as ZIP & JSON... $($_.displayName)" |
This file contains hidden or 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
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"defaultProfile": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}", | |
"copyOnSelect": false, | |
"copyFormatting": false, | |
"profiles": { | |
"defaults": { | |
"fontFace": "JetBrains Mono", | |
"fontSize": 12 | |
}, |
This file contains hidden or 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
docker run --rm -it -v ${PWD}:/home/cli-microsoft365/scripts -e "CLIMICROSOFT365_AADAPPID=da049853-dd90-49df-aa21-4e0c8b646a36" -e "CLIMICROSOFT365_TENANT=e8954f17-a373-4b61-b54d-45c038fe3188" -e "[email protected]" -e "M365_PASSWORD=password" m365pnp/cli-microsoft365:next pwsh scripts/script.ps1 |