Skip to content

Instantly share code, notes, and snippets.

View mozziemozz's full-sized avatar
🏠
Working from home

Martin Heusser mozziemozz

🏠
Working from home
View GitHub Profile
<#
.SYNOPSIS
Clears the Teams client cache on Windows machines.
.DESCRIPTION
Clears the Teams client cache for whichever Teams version is currently in use while retaining the custom backgrounds.
Authors: Martin Heusser | MVP
Version: 1.0.1
Changelog: 2023-12-01: Initial release
<html>
<head>
<title>Teams Tab App</title>
<script src= 'https://statics.teams.cdn.office.net/sdk/v1.6.0/js/MicrosoftTeams.min.js'></script>
</head>
<body>
<script>
microsoftTeams.initialize();
microsoftTeams.executeDeepLink('https://teams.microsoft.com/l/call/0/0?users=4:%2b41123456789');
</script>
@mozziemozz
mozziemozz / ValidateTeamsRNLExample.ps1
Created August 25, 2023 08:37
Example script to validate Teams phone number assignments by using reverse number lookup
<#
.SYNOPSIS
Example script to validate Teams phone number assignments by using reverse number lookup function from this repo.
.DESCRIPTION
Author: Martin Heusser
Version: 1.0.0
Sponsor Project: https://github.com/sponsors/mozziemozz
Website: https://heusser.pro
<#
.SYNOPSIS
This script sets emergency locations for unassigned phone numbers in Microsoft Teams.
.DESCRIPTION
This script connects to the Microsoft Teams service using a service principal and sets
emergency locations for phone numbers that do not have a location assigned.
.NOTES
<#
.SYNOPSIS
Script to set work location in Microsoft Teams.
.DESCRIPTION
Author: Martin Heusser
Version: 1.0.1
Sponsor Project: https://github.com/sponsors/mozziemozz
Website: https://heusser.pro
<#
.SYNOPSIS
Script to prettify phone numbers for Teams users and update them in Azure Active Directory.
.DESCRIPTION
Author: Martin Heusser
Version: 1.0.0
Sponsor Project: https://github.com/sponsors/mozziemozz
Website: https://heusser.pro
Link: https://github.com/mozziemozz/TeamsPhoneAutomation/blob/main/Scripts/PhoneNumberFormatting/PrettifyPhoneNumbersAdminAccount.ps1
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)][String]$TenantId,
[Parameter(Mandatory=$true)][String]$AppId,
[Parameter(Mandatory=$true)][String]$AppSecret
)
Invoke-Expression (Invoke-RestMethod -Method Get -Uri "https://raw.githubusercontent.com/mozziemozz/TeamsPhoneAutomation/main/Functions/Connect-MgGraphHTTP.ps1")
. Connect-MgGraphHTTP -TenantId $TenantId -AppId $AppId -AppSecret $AppSecret
$ClientSecret = ""
$ApplicationID = ""
$TenantID = ""
$graphtokenBody = @{
Grant_Type = "client_credentials"
Scope = "https://graph.microsoft.com/.default"
Client_Id = $ApplicationID
Client_Secret = $ClientSecret
}
<#
.SYNOPSIS
Deploys simple call flows from A-Z by data specified in a CSV file.
.DESCRIPTION
Author: Martin Heusser
Version: 1.0.0
Changelog: .\Changelog.md
#>
# Get Version
$checkPythonVersion = py -3 --version
if (!$checkPythonVersion) {
Write-Warning "Python was not found on your system. Please install it."
exit
}