Skip to content

Instantly share code, notes, and snippets.

Brian T. Jackett BrianTJackett

Block or report user

Report or block BrianTJackett

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
BrianTJackett / WT-profiles.json
Last active Sep 16, 2019
Windows Terminal settings.json file with included shells (profiles) for PowerShell v7 Preview 1 and Zsh.
View WT-profiles.json
"globals" :
"alwaysShowTabs" : true,
"defaultProfile" : "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"initialCols" : 120,
"initialRows" : 30,
"keybindings" :
BrianTJackett / PS-Get_PowerApps_App_Connections.ps1
Created Mar 14, 2019
Iterate through all environments and get all PowerApps apps and the connections they use.
View PS-Get_PowerApps_App_Connections.ps1
$environments = Get-PowerAppEnvironment
foreach($environ in $environments.EnvironmentName)
$apps = Get-AdminPowerApp -EnvironmentName $environ
$apps | Add-Member -MemberType ScriptProperty -Name Connections -Value {$} -Force
$apps | Select-Object AppName, DisplayName, Connections
View CS-Graph_Request_Users_GraphServiceClient.cs
var graphResult = graphClient.Users.Request().GetAsync().Result;
BrianTJackett / CS-Graph_Class_MsalAuthenticationProvider.cs
Created Dec 11, 2018
Microsoft Graph create class to handle authentication with Azure AD and use access token on subsequent requests.
View CS-Graph_Class_MsalAuthenticationProvider.cs
public class MsalAuthenticationProvider : IAuthenticationProvider
private ConfidentialClientApplication _clientApplication;
private string[] _scopes;
public MsalAuthenticationProvider(ConfidentialClientApplication clientApplication, string[] scopes) {
_clientApplication = clientApplication;
_scopes = scopes;
BrianTJackett / CS-Graph_Prepare_GraphServiceClient.cs
Last active Aug 22, 2019
Microsoft Graph C# .Net Core prepare GraphServiceClient
View CS-Graph_Prepare_GraphServiceClient.cs
var clientId = "<AzureADAppClientId>";
var clientSecret = "<AzureADAppClientSecret>";
var redirectUri = "<AzureADAppRedirectUri>";
var authority = "<AzureADAppTenantId>/v2.0";
var cca = new ConfidentialClientApplication(clientId, authority, redirectUri, new ClientCredential(clientSecret), null, null);
// use the default permissions assigned from within the Azure AD app registration portal
List<string> scopes = new List<string>();
BrianTJackett / PS-Get_All_Sites_SPO.ps1
Created Jul 31, 2018
Get all sites from SharePoint Online using SPO Management Shell commands.
View PS-Get_All_Sites_SPO.ps1
Connect-SPOService -Url '<tenantAdminUrl>'
Get-SPOSite -Limit all -IncludePersonalSite $true
BrianTJackett / CS-CSOM_Traverse_All_Sites_SPO.txt
Last active Jul 1, 2019
Traverse all sites in SharePoint Online using C# CSOM.
View CS-CSOM_Traverse_All_Sites_SPO.txt
List <SiteProperties> list = new List <SiteProperties>();
SPOSitePropertiesEnumerable ssp = null;
SPOSitePropertiesEnumerableFilter sspFilter = new SPOSitePropertiesEnumerableFilter();
SharePointOnlineCredentials creds = new SharePointOnlineCredentials("myUsernameGoesHere", securePassword);
using (ClientContext cc = new ClientContext("myURLGoesHere"))
cc.Credentials = creds;
You can’t perform that action at this time.