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
| Invoke-RestMethod -Uri ("https://outlook.office365.com/api/v1.0/users/[email protected]/calendarview?startDateTime=" + (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddThh:mm:ssZ") + "&endDateTime=" + (Get-Date).ToUniversalTime().AddDays(7).ToString("yyyy-MM-ddThh:mm:ssZ")) -Credential (Get-Credential) | foreach-object{$_.Value} |
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
| <link rel="import" href="../google-map/google-map.html"> | |
| <link rel="import" href="../core-menu/core-submenu.html"> | |
| <link rel="import" href="../core-item/core-item.html"> | |
| <link rel="import" href="../ace-element/ace-element.html"> | |
| <polymer-element name="my-element"> | |
| <template> | |
| <style> | |
| :host { |
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
| #r "Newtonsoft.Json" | |
| using System.Net; | |
| using Microsoft.AspNetCore.Mvc; | |
| using Microsoft.Extensions.Primitives; | |
| using System.Net.Http; | |
| using System.Net.Http.Headers; | |
| using System.Text; | |
| public static async Task<IActionResult> Run(HttpRequest req, ILogger log) |
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
| param( | |
| [Parameter(Position = 0, Mandatory = $false)] | |
| [object] | |
| $WebhookData | |
| ) | |
| function Invoke-PresenceDLCheck { | |
| param( | |
| [Parameter(Position = 0, Mandatory = $false)] |
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
| function Get-TenantId { | |
| param( | |
| [Parameter(Position = 1, Mandatory = $false)] | |
| [String]$DomainName | |
| ) | |
| Begin { | |
| $RequestURL = "https://login.windows.net/{0}/.well-known/openid-configuration" -f $DomainName | |
| Add-Type -AssemblyName System.Net.Http | |
| $handler = New-Object System.Net.Http.HttpClientHandler |
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
| function Get-TenantId { | |
| param( | |
| [Parameter(Position = 1, Mandatory = $false)] | |
| [String]$DomainName | |
| ) | |
| Begin { | |
| $RequestURL = "https://login.windows.net/{0}/.well-known/openid-configuration" -f $DomainName | |
| Add-Type -AssemblyName System.Net.Http | |
| $handler = New-Object System.Net.Http.HttpClientHandler |
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
| $folderid= new-object Microsoft.Exchange.WebServices.Data.FolderId([Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::Root,$MailboxName) | |
| $TeamMeetingsFolderEntryId = new-object Microsoft.Exchange.WebServices.Data.ExtendedPropertyDefinition([System.Guid]::Parse("{07857F3C-AC6C-426B-8A8D-D1F7EA59F3C8}"), "TeamsMeetingsFolderEntryId", [Microsoft.Exchange.WebServices.Data.MapiPropertyType]::Binary); | |
| $psPropset= new-object Microsoft.Exchange.WebServices.Data.PropertySet([Microsoft.Exchange.WebServices.Data.BasePropertySet]::FirstClassProperties) | |
| $psPropset.Add($TeamMeetingsFolderEntryId) | |
| $RootFolder = [Microsoft.Exchange.WebServices.Data.Folder]::Bind($service,$folderid,$psPropset) | |
| $FolderIdVal = $null | |
| $TeamsMeetingFolder = $null | |
| if ($RootFolder.TryGetProperty($TeamMeetingsFolderEntryId,[ref]$FolderIdVal)) | |
| { |
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
| function Connect-Exchange { | |
| param( | |
| [Parameter(Position = 0, Mandatory = $true)] [string]$MailboxName, | |
| [Parameter(Position = 1, Mandatory = $false)] [string]$url, | |
| [Parameter(Position = 2, Mandatory = $false)] [string]$ClientId, | |
| [Parameter(Position = 3, Mandatory = $false)] [string]$redirectUrl, | |
| [Parameter(Position = 4, Mandatory = $false)] [string]$AccessToken, | |
| [Parameter(Position = 5, Mandatory = $false)] [switch]$basicAuth, | |
| [Parameter(Position = 6, Mandatory = $false)] [System.Management.Automation.PSCredential]$Credentials |
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
| $KeyVaultURL = "https://xxx.vault.azure.net/secrets/App1AuthCert/xxx99c5d054f43698f39c51f24440xxx?api-version=7.0" | |
| $SptokenResult = Invoke-WebRequest -Uri 'http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https%3A%2F%2Fvault.azure.net' -Headers @{Metadata="true"} | |
| $Sptoken = ConvertFrom-Json $SptokenResult.Content | |
| $headers = @{ | |
| 'Content-Type' = 'application\json' | |
| 'Authorization' = 'Bearer ' + $Sptoken.access_token | |
| } | |
| $Response = (Invoke-WebRequest -Uri $KeyVaultURL -Headers $headers) | |
| $certResponse = ConvertFrom-Json $Response.Content |
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
| $ClientId = "12d09d34-c3a3-49fc-bdf7-e059801801ae" | |
| $MailboxName = "[email protected]" | |
| $KeyVaultURL = "https://gspskeys.vault.azure.net/secrets/App1AuthCert/xxx99c5d054f43698f39c51f24440xxx?api-version=7.0" | |
| Import-Module .\Microsoft.IdentityModel.Clients.ActiveDirectory.dll -Force | |
| $TenantId = (Invoke-WebRequest -Uri ('https://login.windows.net/' + $MailboxName.Split('@')[1] + '/.well-known/openid-configuration') | ConvertFrom-Json).authorization_endpoint.Split('/')[3] | |
| $SptokenResult = Invoke-WebRequest -Uri 'http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https%3A%2F%2Fvault.azure.net' -Headers @{Metadata="true"} | |
| $Sptoken = ConvertFrom-Json $SptokenResult.Content | |
| $headers = @{ | |
| 'Content-Type' = 'application\json' |
OlderNewer