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
| $obj = New-Object -Type PSCustomObject | |
| $obj | Add-Member -Type NoteProperty -Name "Anchor-Employee ID|String" -Value "" | |
| $obj | Add-Member -Type NoteProperty -Name "objectClass|String" -Value "person" | |
| $obj | Add-Member -Type NoteProperty -Name "First Name|string" -Value "string" | |
| $obj | Add-Member -Type NoteProperty -Name "Last Name|string" -Value "string" | |
| $obj | Add-Member -Type NoteProperty -Name "Title|string" -Value "string" | |
| $obj | Add-Member -Type NoteProperty -Name "Department|string" -Value "string" | |
| $obj | Add-Member -Type NoteProperty -Name "Employee Type|string" -Value "string" | |
| $obj | Add-Member -Type NoteProperty -Name "Employment Start Date|string" -Value "string" | |
| $obj | Add-Member -Type NoteProperty -Name "Employment End Date|string" -Value "string" |
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
| import msal | |
| import jwt | |
| import json | |
| import sys | |
| import requests | |
| from datetime import datetime | |
| from msal_extensions import * | |
| graphURI = 'https://graph.microsoft.com' | |
| tenantID = 'yourTenantID' |
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 | |
| ( | |
| $Username, | |
| $Password, | |
| $Credentials, | |
| $OperationType, | |
| [bool] $usepagedimport, | |
| [int]$pagesize | |
| ) |
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
| $obj = New-Object -Type PSCustomObject | |
| $obj | Add-Member -Type NoteProperty -Name "Anchor-Employee ID|String" -Value "" | |
| $obj | Add-Member -Type NoteProperty -Name "objectClass|String" -Value "person" | |
| $obj | Add-Member -Type NoteProperty -Name "First Name|string" -Value "string" | |
| $obj | Add-Member -Type NoteProperty -Name "Last Name|string" -Value "string" | |
| $obj | Add-Member -Type NoteProperty -Name "Title|string" -Value "string" | |
| $obj | Add-Member -Type NoteProperty -Name "Department|string" -Value "string" | |
| $obj | Add-Member -Type NoteProperty -Name "Employee Type|string" -Value "string" | |
| $obj | Add-Member -Type NoteProperty -Name "Employment Start Date|string" -Value "string" | |
| $obj | Add-Member -Type NoteProperty -Name "Employment End Date|string" -Value "string" |
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 DelegatedAuthN { | |
| <# | |
| .SYNOPSIS | |
| Authenticate to Azure AD (using Delegated Auth) and receieve Access and Refresh Tokens. | |
| .DESCRIPTION | |
| Authenticate to Azure AD (using Delegated Auth) and receieve Access and Refresh Tokens. | |
| .PARAMETER tenantID |
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 AuthN { | |
| <# | |
| .SYNOPSIS | |
| Authenticate to Azure AD and receieve Access and Refresh Tokens. | |
| .DESCRIPTION | |
| Authenticate to Azure AD and receieve Access and Refresh Tokens. | |
| .PARAMETER tenantID | |
| (required) Azure AD TenantID. |
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 AuthN { | |
| <# | |
| .SYNOPSIS | |
| Authenticate to Azure AD and receieve Access and Refresh Tokens. | |
| .DESCRIPTION | |
| Authenticate to Azure AD and receieve Access and Refresh Tokens. | |
| .PARAMETER tenantID | |
| (required) Azure AD TenantID. |
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 AuthN { | |
| <# | |
| .SYNOPSIS | |
| Authenticate to Azure AD and receieve Access and Refresh Tokens. | |
| .DESCRIPTION | |
| Authenticate to Azure AD and receieve Access and Refresh Tokens. | |
| .PARAMETER tenantID | |
| (required) Azure AD TenantID. |
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
| import wincertstore | |
| import base64 | |
| import ssl | |
| import os | |
| from cryptography import x509 | |
| from cryptography.hazmat.backends import default_backend | |
| from cryptography.hazmat.primitives import hashes | |
| from cryptography.x509.oid import ExtensionOID | |
| # Certificate Name & Thumbprint to look for |
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
| import msal | |
| import jwt | |
| import json | |
| import requests | |
| import pandas as pd | |
| from datetime import datetime | |
| accessToken = None | |
| requestHeaders = None | |
| tokenExpiry = None |