<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Mr. Clix It]]></title><description><![CDATA[Ideas, Tips, and Lessons Learned for InfoSec and Technology Professionals.]]></description><link>https://mrclixit.com/</link><image><url>https://mrclixit.com/favicon.png</url><title>Mr. Clix It</title><link>https://mrclixit.com/</link></image><generator>Ghost 5.82</generator><lastBuildDate>Mon, 20 Jul 2026 14:46:40 GMT</lastBuildDate><atom:link href="https://mrclixit.com/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Automate Shared Mailbox Requests Using Azure Logic Apps]]></title><description><![CDATA[<p>This post will detail how to create an Azure Logic App which will take input from an end user (in the form of a SharePoint list entry) and automatically provision a new shared mailbox as well as set up delegation for selected users.</p><p>Prerequisites:</p><ul><li>Azure Az PowerShell module</li><li>MgGraph PowerShell</li></ul>]]></description><link>https://mrclixit.com/automate-shared-mailbox-requests-using-azure-logic-apps/</link><guid isPermaLink="false">6642a53e56d8380001d1619c</guid><category><![CDATA[Power Platform]]></category><category><![CDATA[PowerShell]]></category><category><![CDATA[M365]]></category><category><![CDATA[SharePoint]]></category><category><![CDATA[Exchange]]></category><category><![CDATA[Azure]]></category><category><![CDATA[Automation]]></category><dc:creator><![CDATA[Tim Murphy]]></dc:creator><pubDate>Thu, 12 Jan 2023 00:10:12 GMT</pubDate><media:content url="https://mrclixit.com/content/images/2023/01/logicapps_shared_mailbox-1.png" medium="image"/><content:encoded><![CDATA[<img src="https://mrclixit.com/content/images/2023/01/logicapps_shared_mailbox-1.png" alt="Automate Shared Mailbox Requests Using Azure Logic Apps"><p>This post will detail how to create an Azure Logic App which will take input from an end user (in the form of a SharePoint list entry) and automatically provision a new shared mailbox as well as set up delegation for selected users.</p><p>Prerequisites:</p><ul><li>Azure Az PowerShell module</li><li>MgGraph PowerShell module</li><li>Working knowledge of M365/SharePoint Online/Exchange Online/Azure</li></ul><hr><h1 id="sharepoint-setup">SharePoint Setup</h1><ol><li>Create a SharePoint site</li><li>Create a SharePoint list within your SharePoint site</li><li>Create columns as needed for the data to be input by the requesting users</li></ol><p>Here is an example of the list I created:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-10-at-20.22.36@2x.png" class="kg-image" alt="Automate Shared Mailbox Requests Using Azure Logic Apps" loading="lazy" width="1224" height="832" srcset="https://mrclixit.com/content/images/size/w600/2023/01/CleanShot-2023-01-10-at-20.22.36@2x.png 600w, https://mrclixit.com/content/images/size/w1000/2023/01/CleanShot-2023-01-10-at-20.22.36@2x.png 1000w, https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-10-at-20.22.36@2x.png 1224w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">SharePoint list fields</span></figcaption></figure><hr><h1 id="azure-automation-account-setup">Azure Automation Account Setup</h1><p>Create an Automation Account in the <a href="https://portal.azure.com/?ref=mrclixit.com">Azure portal</a> or via PowerShell.</p><p>Next, navigate to Shared Resources&gt;Modules in the Automation Account blade, and click &quot;Browse gallery&quot; - search for ExchangeOnlineManagement and import the module:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-11-at-10.05.06.png" class="kg-image" alt="Automate Shared Mailbox Requests Using Azure Logic Apps" loading="lazy" width="732" height="404" srcset="https://mrclixit.com/content/images/size/w600/2023/01/CleanShot-2023-01-11-at-10.05.06.png 600w, https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-11-at-10.05.06.png 732w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Import the ExchangeOnlineManagement module to the Automation Account</span></figcaption></figure><p>Now we need to grant the Exchange Online API permission for the managed identity (<a href="https://learn.microsoft.com/en-us/powershell/exchange/connect-exo-powershell-managed-identity?view=exchange-ps&amp;ref=mrclixit.com">reference</a>). Using a managed identity allows the Automation Account to authenticate to Exchange Online without specifying any credentials - pretty cool:</p><ul><li>Connect to MgGraph module: <code>Connect-MgGraph -Scopes AppRoleAssignment.ReadWrite.All,Application.Read.All</code></li><li>Connect to Azure Az module: <code>Connect-AzAccount</code></li><li>Fetch GUID for the Automation Account managed identity: <code>$MI_ID = (Get-AzADServicePrincipal -DisplayName &quot;svc-exchange&quot;).Id</code></li><li>Assign app role to service principal:</li></ul><pre><code class="language-PowerShell">$AppRoleID = &quot;dc50a0fb-09a3-484d-be87-e023b12c6440&quot;
$ResourceID = (Get-MgServicePrincipal -Filter &quot;AppId eq &apos;00000002-0000-0ff1-ce00-000000000000&apos;&quot;).Id

New-MgServicePrincipalAppRoleAssignment -ServicePrincipalId $MI_ID -PrincipalId $MI_ID -AppRoleId $AppRoleID -ResourceId $ResourceID</code></pre><p>Navigate to Azure AD Roles and Administrators&gt;Exchange Administrator&gt;Add assignments, and select the service principal for the Automation Account:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-11-at-10.12.29.png" class="kg-image" alt="Automate Shared Mailbox Requests Using Azure Logic Apps" loading="lazy" width="1523" height="345" srcset="https://mrclixit.com/content/images/size/w600/2023/01/CleanShot-2023-01-11-at-10.12.29.png 600w, https://mrclixit.com/content/images/size/w1000/2023/01/CleanShot-2023-01-11-at-10.12.29.png 1000w, https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-11-at-10.12.29.png 1523w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Add service principal to Exchange Administrator role</span></figcaption></figure><hr><h1 id="creating-the-runbooks">Creating the Runbooks</h1><p>Within the Automation Account, go to Process Automation&gt;Runbooks in the navigation blade. We will be creating two runbooks - one to provision the shared mailbox, and another to set the appropriate delegation.</p><p>Create the first runbook, adjusting the name as you see fit:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-11-at-09.53.08.png" class="kg-image" alt="Automate Shared Mailbox Requests Using Azure Logic Apps" loading="lazy" width="720" height="298" srcset="https://mrclixit.com/content/images/size/w600/2023/01/CleanShot-2023-01-11-at-09.53.08.png 600w, https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-11-at-09.53.08.png 720w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Runbook creation</span></figcaption></figure><p>Here is a simple script for the runbook to provision the shared mailbox:</p><figure class="kg-card kg-code-card"><pre><code class="language-PowerShell">param (
    $EmailAddress,
    $DisplayName
    )

Connect-ExchangeOnline -ManagedIdentity -Organization YOUR_ORG_NAME.onmicrosoft.com

New-Mailbox -Shared -Name $DisplayName -DisplayName $DisplayName -PrimarySmtpAddress $EmailAddress</code></pre><figcaption><p><span style="white-space: pre-wrap;">Provision Shared Mailbox script</span></p></figcaption></figure><p>Be sure to both Save and Publish the runbook. Then create the second runbook to set the delegation on the new shared mailbox. Here is a script for that:</p><figure class="kg-card kg-code-card"><pre><code class="language-PowerShell">param (
    $Users,
    $SharedMailbox
    )

Connect-ExchangeOnline -ManagedIdentity -Organization YOUR_ORG_NAME.onmicrosoft.com
    
foreach ($user in $Users) {
	Add-MailboxPermission -Identity $SharedMailbox -User $user -AccessRights FullAccess
    Add-RecipientPermission -Identity $SharedMailbox -Trustee $user -AccessRights SendAs -Confirm:$false
}</code></pre><figcaption><p><span style="white-space: pre-wrap;">Set Shared Mailbox Delegation script</span></p></figcaption></figure><p>Again, be sure to Save and Publish the runbook.</p><hr><h1 id="logic-app-setup">Logic App Setup</h1><ol><li>Create a new Logic App</li><li>In the Logic App blade&gt;Settings&gt;Identity, turn system assigned managed identity on and click Save</li><li>Add the Logic App managed identity as a Contributor to the resource group the Automation Account resides in. Again, this makes it so that the Logic App can authenticate to the Automation Account to invoke the runbooks without specifying any credentials in the connection:</li></ol><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-10-at-21.34.22@2x.png" class="kg-image" alt="Automate Shared Mailbox Requests Using Azure Logic Apps" loading="lazy" width="1498" height="562" srcset="https://mrclixit.com/content/images/size/w600/2023/01/CleanShot-2023-01-10-at-21.34.22@2x.png 600w, https://mrclixit.com/content/images/size/w1000/2023/01/CleanShot-2023-01-10-at-21.34.22@2x.png 1000w, https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-10-at-21.34.22@2x.png 1498w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Navigate to the resource group and click Add&gt;Add role assignment</span></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-10-at-21.36.20@2x.png" class="kg-image" alt="Automate Shared Mailbox Requests Using Azure Logic Apps" loading="lazy" width="1846" height="848" srcset="https://mrclixit.com/content/images/size/w600/2023/01/CleanShot-2023-01-10-at-21.36.20@2x.png 600w, https://mrclixit.com/content/images/size/w1000/2023/01/CleanShot-2023-01-10-at-21.36.20@2x.png 1000w, https://mrclixit.com/content/images/size/w1600/2023/01/CleanShot-2023-01-10-at-21.36.20@2x.png 1600w, https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-10-at-21.36.20@2x.png 1846w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Add the Logic App managed identity to the Contributor role</span></figcaption></figure><hr><h1 id="building-the-logic-app-flow">Building the Logic App Flow</h1><p>Begin building the Logic App by using a blank template. The trigger for the Logic App will be SharePoint&gt;When an item is created. Select the SharePoint list you created earlier:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-10-at-21.43.22@2x.png" class="kg-image" alt="Automate Shared Mailbox Requests Using Azure Logic Apps" loading="lazy" width="1204" height="582" srcset="https://mrclixit.com/content/images/size/w600/2023/01/CleanShot-2023-01-10-at-21.43.22@2x.png 600w, https://mrclixit.com/content/images/size/w1000/2023/01/CleanShot-2023-01-10-at-21.43.22@2x.png 1000w, https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-10-at-21.43.22@2x.png 1204w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Logic App trigger</span></figcaption></figure><p>We will need to initialize a couple of variables - a string and an array. The string will be used within email notifications to display the users who will be granted permissions to the shared mailbox. The array will be used in our script for the runbook to set the mailbox permissions.</p><p>The next three steps should look like this - Initialize variable&gt;Initialize variable&gt;For each:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-11-at-09.12.35.png" class="kg-image" alt="Automate Shared Mailbox Requests Using Azure Logic Apps" loading="lazy" width="639" height="894" srcset="https://mrclixit.com/content/images/size/w600/2023/01/CleanShot-2023-01-11-at-09.12.35.png 600w, https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-11-at-09.12.35.png 639w"><figcaption><span style="white-space: pre-wrap;">Initialize two variables, then loop through the Mailbox Users (from the SharePoint list) and append to each</span></figcaption></figure><p>Add the next step - Office 365 Outlook&gt;Send approval email. Fill the parameters as you see fit:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-11-at-10.30.55.png" class="kg-image" alt="Automate Shared Mailbox Requests Using Azure Logic Apps" loading="lazy" width="662" height="649" srcset="https://mrclixit.com/content/images/size/w600/2023/01/CleanShot-2023-01-11-at-10.30.55.png 600w, https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-11-at-10.30.55.png 662w"><figcaption><span style="white-space: pre-wrap;">Send approval email to administrator</span></figcaption></figure><p>Add the next step - Condition. Build a condition for &quot;SelectedOption is equal to Approved&quot;:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-10-at-22.14.47@2x.png" class="kg-image" alt="Automate Shared Mailbox Requests Using Azure Logic Apps" loading="lazy" width="1196" height="410" srcset="https://mrclixit.com/content/images/size/w600/2023/01/CleanShot-2023-01-10-at-22.14.47@2x.png 600w, https://mrclixit.com/content/images/size/w1000/2023/01/CleanShot-2023-01-10-at-22.14.47@2x.png 1000w, https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-10-at-22.14.47@2x.png 1196w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">The next action taken depends on the outcome of the approval request</span></figcaption></figure><p>In the True branch, Add an action&gt;Azure Automation&gt;Create job. This is going to use our runbook to create the shared mailbox. Name the connection and select &quot;Logic Apps Managed Identity&quot; for the Authentication Type:</p><figure class="kg-card kg-image-card"><img src="https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-10-at-22.19.32@2x.png" class="kg-image" alt="Automate Shared Mailbox Requests Using Azure Logic Apps" loading="lazy" width="1282" height="716" srcset="https://mrclixit.com/content/images/size/w600/2023/01/CleanShot-2023-01-10-at-22.19.32@2x.png 600w, https://mrclixit.com/content/images/size/w1000/2023/01/CleanShot-2023-01-10-at-22.19.32@2x.png 1000w, https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-10-at-22.19.32@2x.png 1282w" sizes="(min-width: 720px) 720px"></figure><p>Select the Azure Subscription, Resource Group, Automation Account, and Runbook Name (you will need to use the <em>Add new parameter</em> drop-down menu for the runbook name). Use dynamic content from the SharePoint list for the runbook parameters:</p><figure class="kg-card kg-image-card"><img src="https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-10-at-22.21.56@2x.png" class="kg-image" alt="Automate Shared Mailbox Requests Using Azure Logic Apps" loading="lazy" width="1270" height="1164" srcset="https://mrclixit.com/content/images/size/w600/2023/01/CleanShot-2023-01-10-at-22.21.56@2x.png 600w, https://mrclixit.com/content/images/size/w1000/2023/01/CleanShot-2023-01-10-at-22.21.56@2x.png 1000w, https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-10-at-22.21.56@2x.png 1270w" sizes="(min-width: 720px) 720px"></figure><p>Add an action&gt;Azure Automation&gt;Create job again. This is going to run the runbook which will grant Full Access and Send As permissions to the requested users. Supply the necessary parameters:</p><figure class="kg-card kg-image-card"><img src="https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-10-at-23.19.20@2x-2.png" class="kg-image" alt="Automate Shared Mailbox Requests Using Azure Logic Apps" loading="lazy" width="1148" height="1184" srcset="https://mrclixit.com/content/images/size/w600/2023/01/CleanShot-2023-01-10-at-23.19.20@2x-2.png 600w, https://mrclixit.com/content/images/size/w1000/2023/01/CleanShot-2023-01-10-at-23.19.20@2x-2.png 1000w, https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-10-at-23.19.20@2x-2.png 1148w" sizes="(min-width: 720px) 720px"></figure><p>At this point the core functionality is there. I decided to add a few more email notifications - one to notify the requesting user if the request was rejected, and notifications to the administrator and the requestor when the workflow is complete.</p><p>Here is the complete workflow I created:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-11-at-09.45.06.png" class="kg-image" alt="Automate Shared Mailbox Requests Using Azure Logic Apps" loading="lazy" width="1559" height="4256" srcset="https://mrclixit.com/content/images/size/w600/2023/01/CleanShot-2023-01-11-at-09.45.06.png 600w, https://mrclixit.com/content/images/size/w1000/2023/01/CleanShot-2023-01-11-at-09.45.06.png 1000w, https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-11-at-09.45.06.png 1559w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Finished Logic App flow</span></figcaption></figure><hr><h1 id="the-finished-product">The Finished Product</h1><p>First, the end user submits an entry to the SharePoint list:</p><figure class="kg-card kg-image-card"><img src="https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-11-at-09.16.15.png" class="kg-image" alt="Automate Shared Mailbox Requests Using Azure Logic Apps" loading="lazy" width="608" height="475" srcset="https://mrclixit.com/content/images/size/w600/2023/01/CleanShot-2023-01-11-at-09.16.15.png 600w, https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-11-at-09.16.15.png 608w"></figure><p>This triggers the flow, and then an approval email is sent to the administrator:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-11-at-09.18.09.png" class="kg-image" alt="Automate Shared Mailbox Requests Using Azure Logic Apps" loading="lazy" width="940" height="886" srcset="https://mrclixit.com/content/images/size/w600/2023/01/CleanShot-2023-01-11-at-09.18.09.png 600w, https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-11-at-09.18.09.png 940w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Approval email</span></figcaption></figure><p>After approval is granted, the runbook jobs are launched. The shared mailbox is provisioned, and the listed users are granted Full Access and Send As permission:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-11-at-09.24.42-2.png" class="kg-image" alt="Automate Shared Mailbox Requests Using Azure Logic Apps" loading="lazy" width="690" height="83" srcset="https://mrclixit.com/content/images/size/w600/2023/01/CleanShot-2023-01-11-at-09.24.42-2.png 600w, https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-11-at-09.24.42-2.png 690w"><figcaption><span style="white-space: pre-wrap;">Shared Mailbox is created</span></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-11-at-09.30.12.png" class="kg-image" alt="Automate Shared Mailbox Requests Using Azure Logic Apps" loading="lazy" width="537" height="356"><figcaption><span style="white-space: pre-wrap;">Full Access permissions granted</span></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2023/01/image-5.png" class="kg-image" alt="Automate Shared Mailbox Requests Using Azure Logic Apps" loading="lazy" width="529" height="356"><figcaption><span style="white-space: pre-wrap;">Send As permissions granted</span></figcaption></figure><p>A completion email is sent to the administrator and the requesting user:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-11-at-09.31.59.png" class="kg-image" alt="Automate Shared Mailbox Requests Using Azure Logic Apps" loading="lazy" width="939" height="355" srcset="https://mrclixit.com/content/images/size/w600/2023/01/CleanShot-2023-01-11-at-09.31.59.png 600w, https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-11-at-09.31.59.png 939w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Admin notification</span></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-11-at-09.34.10.png" class="kg-image" alt="Automate Shared Mailbox Requests Using Azure Logic Apps" loading="lazy" width="937" height="375" srcset="https://mrclixit.com/content/images/size/w600/2023/01/CleanShot-2023-01-11-at-09.34.10.png 600w, https://mrclixit.com/content/images/2023/01/CleanShot-2023-01-11-at-09.34.10.png 937w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">End user notification</span></figcaption></figure><p>Now the workflow is complete.</p><hr><p>Logic Apps are a great way to easily automate routine administrative tasks or helpdesk requests. Using the same general workflow described in this post, you can automate many different tasks. I hope this post helps and provokes further ideas for improvement in your environment.</p>]]></content:encoded></item><item><title><![CDATA[Voice Calls Triggered by Email Alerts Using Power Automate and Plivo]]></title><description><![CDATA[<p>If someone isn&apos;t able to triage and respond to an alert in a reasonable amount of time, the outcome can be less than desirable. </p><p>Say you are part of a small team and don&apos;t have a set of eyes on alerts 24/7 and something happens</p>]]></description><link>https://mrclixit.com/voice-calls-triggered-by-email-alerts-using-power-automate-and-plivo/</link><guid isPermaLink="false">6642a53e56d8380001d1619b</guid><category><![CDATA[Power Platform]]></category><category><![CDATA[Automation]]></category><dc:creator><![CDATA[Tim Murphy]]></dc:creator><pubDate>Mon, 16 May 2022 02:25:38 GMT</pubDate><media:content url="https://mrclixit.com/content/images/2022/05/powerautomate_plivo-1-.png" medium="image"/><content:encoded><![CDATA[<img src="https://mrclixit.com/content/images/2022/05/powerautomate_plivo-1-.png" alt="Voice Calls Triggered by Email Alerts Using Power Automate and Plivo"><p>If someone isn&apos;t able to triage and respond to an alert in a reasonable amount of time, the outcome can be less than desirable. </p><p>Say you are part of a small team and don&apos;t have a set of eyes on alerts 24/7 and something happens overnight when the team is sleeping. Your monitoring system may be working as intended and fire off an alert email in the middle of the night when certain conditions are met, but what good is it if it doesn&apos;t get anyone&apos;s attention?</p><p>If you can&apos;t afford around-the-clock detection and response, you need to prepare yourself some other way for those truly time-sensitive events which will inevitably arise at the most inconvenient of times. </p><p>I came up with this simple solution using an email as a trigger, which will generate a phone call informing the appropriate personnel to get to a PC and take action.</p><p>This post assumes some basic knowledge of REST APIs and requires a Power Automate premium license.</p><hr><h1 id="plivo">Plivo</h1><p>Plivo is a Voice and Messaging API which I found easy to use and has good developer documentation. Their prices are reasonable and when I signed up for a trial account they provided a generous $25.00 credit.</p><h2 id="setup">Setup</h2><p><a href="https://console.plivo.com/accounts/register/?ref=mrclixit.com">Sign up</a> for an account on Plivo&apos;s website. You will need to use a work email address (common personal email domains such as gmail.com are not allowed).</p><p>Sign in to your account, and make note of your Auth ID and Auth Token as shown on your dashboard:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2022/05/CleanShot-2022-05-15-at-14.17.45@2x.png" class="kg-image" alt="Voice Calls Triggered by Email Alerts Using Power Automate and Plivo" loading="lazy" width="2000" height="467" srcset="https://mrclixit.com/content/images/size/w600/2022/05/CleanShot-2022-05-15-at-14.17.45@2x.png 600w, https://mrclixit.com/content/images/size/w1000/2022/05/CleanShot-2022-05-15-at-14.17.45@2x.png 1000w, https://mrclixit.com/content/images/size/w1600/2022/05/CleanShot-2022-05-15-at-14.17.45@2x.png 1600w, https://mrclixit.com/content/images/size/w2400/2022/05/CleanShot-2022-05-15-at-14.17.45@2x.png 2400w" sizes="(min-width: 720px) 720px"><figcaption>Plivo Account Overview Dashboard</figcaption></figure><p>Purchase a number by selecting the Phone Numbers icon in the left navbar, and then click <em>Buy Number</em>.<em> </em>You can search for your desired prefix and country code on the following page. This will be the number that calls originate from:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2022/05/CleanShot-2022-05-15-at-15.57.31@2x-1.png" class="kg-image" alt="Voice Calls Triggered by Email Alerts Using Power Automate and Plivo" loading="lazy" width="2000" height="544" srcset="https://mrclixit.com/content/images/size/w600/2022/05/CleanShot-2022-05-15-at-15.57.31@2x-1.png 600w, https://mrclixit.com/content/images/size/w1000/2022/05/CleanShot-2022-05-15-at-15.57.31@2x-1.png 1000w, https://mrclixit.com/content/images/size/w1600/2022/05/CleanShot-2022-05-15-at-15.57.31@2x-1.png 1600w, https://mrclixit.com/content/images/size/w2400/2022/05/CleanShot-2022-05-15-at-15.57.31@2x-1.png 2400w" sizes="(min-width: 720px) 720px"><figcaption>Phone Numbers</figcaption></figure><p>Next, you will want to create a &quot;PHLO.&quot; A PHLO is a workflow within Plivo that can be triggered via an API call or other events. Using the left navbar, select the PHLO icon and then click <em>Create New PHLO:</em></p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2022/05/CleanShot-2022-05-15-at-14.22.45@2x.png" class="kg-image" alt="Voice Calls Triggered by Email Alerts Using Power Automate and Plivo" loading="lazy" width="2000" height="659" srcset="https://mrclixit.com/content/images/size/w600/2022/05/CleanShot-2022-05-15-at-14.22.45@2x.png 600w, https://mrclixit.com/content/images/size/w1000/2022/05/CleanShot-2022-05-15-at-14.22.45@2x.png 1000w, https://mrclixit.com/content/images/size/w1600/2022/05/CleanShot-2022-05-15-at-14.22.45@2x.png 1600w, https://mrclixit.com/content/images/size/w2400/2022/05/CleanShot-2022-05-15-at-14.22.45@2x.png 2400w" sizes="(min-width: 720px) 720px"><figcaption>PHLO List</figcaption></figure><p>A window will pop up with several options to use as a template, simply select <em>Build my own</em> to start with a blank canvas:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2022/05/CleanShot-2022-05-15-at-14.28.46@2x.png" class="kg-image" alt="Voice Calls Triggered by Email Alerts Using Power Automate and Plivo" loading="lazy" width="1862" height="924" srcset="https://mrclixit.com/content/images/size/w600/2022/05/CleanShot-2022-05-15-at-14.28.46@2x.png 600w, https://mrclixit.com/content/images/size/w1000/2022/05/CleanShot-2022-05-15-at-14.28.46@2x.png 1000w, https://mrclixit.com/content/images/size/w1600/2022/05/CleanShot-2022-05-15-at-14.28.46@2x.png 1600w, https://mrclixit.com/content/images/2022/05/CleanShot-2022-05-15-at-14.28.46@2x.png 1862w" sizes="(min-width: 720px) 720px"><figcaption>PHLO Templates</figcaption></figure><p>From the components on the left, drag &quot;Play Audio&quot; into your PHLO designer (1). Then, drag a connector from &quot;Incoming Call&quot; within your &quot;Start&quot; component (2) to your new &quot;Play Audio&quot; component (3):</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2022/05/CleanShot-2022-05-15-at-14.40.10@2x.png" class="kg-image" alt="Voice Calls Triggered by Email Alerts Using Power Automate and Plivo" loading="lazy" width="1218" height="948" srcset="https://mrclixit.com/content/images/size/w600/2022/05/CleanShot-2022-05-15-at-14.40.10@2x.png 600w, https://mrclixit.com/content/images/size/w1000/2022/05/CleanShot-2022-05-15-at-14.40.10@2x.png 1000w, https://mrclixit.com/content/images/2022/05/CleanShot-2022-05-15-at-14.40.10@2x.png 1218w" sizes="(min-width: 720px) 720px"><figcaption>PHLO Designer Interface</figcaption></figure><p>Select your Play Audio component within the designer to configure it. Give it a name, select either speech-to-text or upload an audio file, and specify any advanced settings:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2022/05/CleanShot-2022-05-15-at-15.23.40@2x-1.png" class="kg-image" alt="Voice Calls Triggered by Email Alerts Using Power Automate and Plivo" loading="lazy" width="274" height="500"><figcaption>Play Audio settings</figcaption></figure><p>Rename your PHLO in the top left corner and then save it. Click <em>Copy PHLO URL </em>in the top right corner and save this, you will need it in the next section.</p><hr><h1 id="power-automate-flow">Power Automate Flow</h1><p>Navigate to <a href="https://flow.microsoft.com/?ref=mrclixit.com">flow.microsoft.com</a> and then click Create&gt;Automated cloud flow:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2022/05/CleanShot-2022-05-15-at-16.05.16@2x.png" class="kg-image" alt="Voice Calls Triggered by Email Alerts Using Power Automate and Plivo" loading="lazy" width="2000" height="802" srcset="https://mrclixit.com/content/images/size/w600/2022/05/CleanShot-2022-05-15-at-16.05.16@2x.png 600w, https://mrclixit.com/content/images/size/w1000/2022/05/CleanShot-2022-05-15-at-16.05.16@2x.png 1000w, https://mrclixit.com/content/images/size/w1600/2022/05/CleanShot-2022-05-15-at-16.05.16@2x.png 1600w, https://mrclixit.com/content/images/size/w2400/2022/05/CleanShot-2022-05-15-at-16.05.16@2x.png 2400w" sizes="(min-width: 720px) 720px"><figcaption>Create new flow</figcaption></figure><p>Give the flow a name, and for the trigger select <em>When a new email arrives (V3)</em>. Create the flow:</p><figure class="kg-card kg-image-card"><img src="https://mrclixit.com/content/images/2022/05/CleanShot-2022-05-15-at-16.17.08@2x-1.png" class="kg-image" alt="Voice Calls Triggered by Email Alerts Using Power Automate and Plivo" loading="lazy" width="508" height="600"></figure><p>Click <em>Show advanced options </em>within the <em>When a new emails arrives (V3)</em> step. Enter the appropriate values to filter on the alert email you want to notify on:</p><figure class="kg-card kg-image-card"><img src="https://mrclixit.com/content/images/2022/05/CleanShot-2022-05-15-at-16.40.55@2x-2.png" class="kg-image" alt="Voice Calls Triggered by Email Alerts Using Power Automate and Plivo" loading="lazy" width="600" height="455" srcset="https://mrclixit.com/content/images/2022/05/CleanShot-2022-05-15-at-16.40.55@2x-2.png 600w"></figure><p>Click the <em>New Step</em> button and add the <em>HTTP</em> action:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2022/05/CleanShot-2022-05-15-at-16.56.58@2x.png" class="kg-image" alt="Voice Calls Triggered by Email Alerts Using Power Automate and Plivo" loading="lazy" width="600" height="505" srcset="https://mrclixit.com/content/images/2022/05/CleanShot-2022-05-15-at-16.56.58@2x.png 600w"><figcaption>HTTP action</figcaption></figure><p>Set the method for the HTTP request to <code>POST</code>.<br>Set the URI to <code>https://api.plivo.com/v1/Account/YOUR_AUTH_ID_HERE/Call/</code>.<br>Add <code>Content-Type</code> as a key with <code>application/json</code> as its value in the headers.<br>Use the following as the JSON body:</p><pre><code>{
  &quot;from&quot;: &quot;PURCHASED_NUMBER_HERE&quot;,
  &quot;to&quot;: &quot;NUMBER_TO_CALL_HERE&quot;,
  &quot;answer_url&quot;: &quot;PHLO_URL_HERE&quot;,
  &quot;answer_method&quot;: &quot;POST&quot;,
  &quot;time_limit&quot;: &quot;60&quot;
}</code></pre><p>Set Authentication to <code>Basic</code>.<br>Set Username to your <code>Auth ID</code>.<br>Set Password to your <code>Auth Token</code>.</p><p>The action should look similar to this (my use case requires an additional line in the Body):</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2022/05/CleanShot-2022-05-15-at-17.25.46@2x-1.png" class="kg-image" alt="Voice Calls Triggered by Email Alerts Using Power Automate and Plivo" loading="lazy" width="600" height="677" srcset="https://mrclixit.com/content/images/2022/05/CleanShot-2022-05-15-at-17.25.46@2x-1.png 600w"><figcaption>Settings for HTTP request</figcaption></figure><p>This will use send a POST request to the Plivo Call endpoint which will generate a phone call. The options in the Body will determine what number the phone call originates from and which number is dialed.</p><p>After the phone call is answered, a callback is made to the URL specified in the <code>answer_url</code> (your PHLO URL) which will invoke your PHLO. This will either speak the text you specified or play the audio file you uploaded earlier.</p><p>Be sure to save the flow. </p><hr><p>Next time you receive an email matching the criteria you set, you will receive a phone call automatically. I would recommend setting a unique ringtone and excluding the number from your Do Not Disturb settings on your cell phone to ensure you hear the call.</p><p>There are many situations this can be easily adapted to, hopefully you can derive value from a use case of your own.</p>]]></content:encoded></item><item><title><![CDATA[Identifying Legacy TLS Traffic in Cloudflare with PowerShell]]></title><description><![CDATA[<p>Cloudflare makes it incredibly easy to restrict deprecated TLS versions for all of your services, provided that your traffic is being proxied through them. While enforcing secure versions of TLS is easy, you should still do your due diligence before restricting TLS 1.0 and 1.1 if you are</p>]]></description><link>https://mrclixit.com/identifying-legacy-tls-traffic-in-cloudflare-with-powershell/</link><guid isPermaLink="false">6642a53e56d8380001d1619a</guid><category><![CDATA[PowerShell]]></category><category><![CDATA[Cloudflare]]></category><category><![CDATA[Security]]></category><dc:creator><![CDATA[Tim Murphy]]></dc:creator><pubDate>Wed, 13 Apr 2022 04:30:42 GMT</pubDate><media:content url="https://mrclixit.com/content/images/2022/04/cloudflare_legacy_tls.png" medium="image"/><content:encoded><![CDATA[<img src="https://mrclixit.com/content/images/2022/04/cloudflare_legacy_tls.png" alt="Identifying Legacy TLS Traffic in Cloudflare with PowerShell"><p>Cloudflare makes it incredibly easy to restrict deprecated TLS versions for all of your services, provided that your traffic is being proxied through them. While enforcing secure versions of TLS is easy, you should still do your due diligence before restricting TLS 1.0 and 1.1 if you are still allowing that traffic today.</p><p>There is a widget that will show your entire domain&apos;s observed traffic broken out by TLS version over a rolling 24 hour period, but in order to drill deeper to determine what source/destinations are involved, you will need to use either the Logpush or Logpull API.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2022/04/CleanShot-2022-04-12-at-18.48.02@2x.png" class="kg-image" alt="Identifying Legacy TLS Traffic in Cloudflare with PowerShell" loading="lazy" width="1724" height="436" srcset="https://mrclixit.com/content/images/size/w600/2022/04/CleanShot-2022-04-12-at-18.48.02@2x.png 600w, https://mrclixit.com/content/images/size/w1000/2022/04/CleanShot-2022-04-12-at-18.48.02@2x.png 1000w, https://mrclixit.com/content/images/size/w1600/2022/04/CleanShot-2022-04-12-at-18.48.02@2x.png 1600w, https://mrclixit.com/content/images/2022/04/CleanShot-2022-04-12-at-18.48.02@2x.png 1724w" sizes="(min-width: 720px) 720px"><figcaption>Example Traffic Served Over TLS Depiction from SSL/TLS&gt;Overview in Cloudflare admin portal</figcaption></figure><p>If you are not familiar, see my other post, <a href="https://mrclixit.com/using-the-cloudflare-logpull-api-with-powershell/">Using the Cloudflare Logpull API with PowerShell</a>, for a quick primer. Following the steps in that post will ensure that you retrieve your API key, Zone ID, and enable log retention, which will all be required to proceed here.</p><hr><p>In this example we will be using the Logpull API to fetch events which include the <code>ClientSSLProtocol</code> field to display which version of TLS was used for the connection. This script will fetch the previous hour&apos;s worth of logs via the <code>/logs/received</code> endpoint for your zone and save as a .ndjson file locally:</p><figure class="kg-card kg-code-card"><pre><code class="language-powershell">#Specify filepath to export logs
$exportPath = &quot;C:\some\file\path.ndjson&quot;

#Cloudflare API Key
$apiKey = &quot;YOUR_API_KEY_HERE&quot;
#Cloudflare Zone
$zone = &quot;YOUR_ZONE_ID_HERE&quot;
#Cloudflare Profile Email Address
$email = &quot;YOUR_EMAIL_ADDRESS_HERE&quot;

#Get time from 1 hour ago in ISO 8601 format; e.g. 2022-03-23T02:30:19Z
$timeStart = (Get-Date -AsUTC).AddHours(-1).ToString(&quot;yyyy-MM-ddTHH:mm:ss&quot;) + &quot;Z&quot;
#Get time from 1 minute ago in ISO 8601 format; e.g. 2022-03-23T03:29:19Z
$timeEnd = (Get-Date -AsUTC).AddMinutes(-1).ToString(&quot;yyyy-MM-ddTHH:mm:ss&quot;) + &quot;Z&quot;

#Specify fields to return
$fields = &quot;ClientIP,ClientRequestHost,ClientSSLProtocol,ClientRequestMethod,ClientRequestURI,EdgeEndTimestamp,EdgeResponseBytes,EdgeResponseStatus,EdgeStartTimestamp,RayID&quot;
#URL endpoint with parameters
$url = &quot;https://api.cloudflare.com/client/v4/zones/$zone/logs/received?start=$timeStart&amp;end=$timeEnd&amp;fields=$fields&quot;

#Required authentication headers
$headers = @{
    &quot;X-Auth-Key&quot;   = $apiKey
    &quot;X-Auth-Email&quot; = $email
    &quot;Content-Type&quot; = &quot;application/json&quot;
}

#Send request, store response
$response = Invoke-RestMethod -Method Get -Uri $url -Headers $headers

#Create .ndjson file at $exportPath if it doesn&apos;t already exist, add contents of response to file
if (!(Test-Path -Path $exportPath)) {
    New-Item -Path $exportPath
    Add-Content -Path $exportPath -Value $response
} else {
    Add-Content -Path $exportPath -Value $response
}</code></pre><figcaption>Fetch one hour&apos;s worth of logs and save to a .ndjson file locally</figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2022/04/CleanShot-2022-04-12-at-21.06.50@2x.png" class="kg-image" alt="Identifying Legacy TLS Traffic in Cloudflare with PowerShell" loading="lazy" width="2000" height="225" srcset="https://mrclixit.com/content/images/size/w600/2022/04/CleanShot-2022-04-12-at-21.06.50@2x.png 600w, https://mrclixit.com/content/images/size/w1000/2022/04/CleanShot-2022-04-12-at-21.06.50@2x.png 1000w, https://mrclixit.com/content/images/size/w1600/2022/04/CleanShot-2022-04-12-at-21.06.50@2x.png 1600w, https://mrclixit.com/content/images/size/w2400/2022/04/CleanShot-2022-04-12-at-21.06.50@2x.png 2400w" sizes="(min-width: 720px) 720px"><figcaption>Example output</figcaption></figure><p>Now that we have a file with newline-delimited JSON, we can convert this to a CSV, for example, to manually inspect the logs and filter for a specific versions of observed TLS traffic:</p><figure class="kg-card kg-code-card"><pre><code class="language-powershell">#Specify filepath to .ndjson file
$inputPath = &quot;C:\some\file\path.ndjson&quot;

#Specify filepath to export CSV
$exportPath = &quot;C:\some\file\path.csv&quot;

#Get content of file, convert from JSON to PowerShell objects, export as CSV
Get-Content -Path $inputPath | ConvertFrom-Json | Export-Csv -Path $exportPath</code></pre><figcaption>Convert NDJSON to CSV</figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2022/04/CleanShot-2022-04-12-at-21.16.31@2x.png" class="kg-image" alt="Identifying Legacy TLS Traffic in Cloudflare with PowerShell" loading="lazy" width="1312" height="578" srcset="https://mrclixit.com/content/images/size/w600/2022/04/CleanShot-2022-04-12-at-21.16.31@2x.png 600w, https://mrclixit.com/content/images/size/w1000/2022/04/CleanShot-2022-04-12-at-21.16.31@2x.png 1000w, https://mrclixit.com/content/images/2022/04/CleanShot-2022-04-12-at-21.16.31@2x.png 1312w" sizes="(min-width: 720px) 720px"><figcaption>Example CSV output</figcaption></figure><hr><p>The example outlined above can be a quick way to identify a sample of traffic and look for specific hosts and URIs with external connections over a particular TLS version. You could easily run the first script as a scheduled task or cron job to get traffic over a longer period of time, depending on your needs.</p><p>This method will not scale well with large datasets - for that, it would be recommended to use the Logpush API to send Cloudflare logs to a system capable of indexing large amounts of data.</p>]]></content:encoded></item><item><title><![CDATA[Using the Cloudflare Logpull API with PowerShell]]></title><description><![CDATA[<p>Cloudflare has a great Analytics dashboard that provides good insight into your proxied web traffic. While the interface is intuitive and great for some high-level information, the dashboard may not always have the information you need.</p><p>The advanced logs you are looking for can be retrieved using either Logpush or</p>]]></description><link>https://mrclixit.com/using-the-cloudflare-logpull-api-with-powershell/</link><guid isPermaLink="false">6642a53e56d8380001d16198</guid><category><![CDATA[PowerShell]]></category><category><![CDATA[Cloudflare]]></category><dc:creator><![CDATA[Tim Murphy]]></dc:creator><pubDate>Thu, 24 Mar 2022 03:44:44 GMT</pubDate><media:content url="https://mrclixit.com/content/images/2022/03/cloudflare_logpull-1.png" medium="image"/><content:encoded><![CDATA[<img src="https://mrclixit.com/content/images/2022/03/cloudflare_logpull-1.png" alt="Using the Cloudflare Logpull API with PowerShell"><p>Cloudflare has a great Analytics dashboard that provides good insight into your proxied web traffic. While the interface is intuitive and great for some high-level information, the dashboard may not always have the information you need.</p><p>The advanced logs you are looking for can be retrieved using either Logpush or Logpull. In this post we will cover the basics and retrieve some logs using the Logpull API with PowerShell.</p><hr><h1 id="gather-requirements">Gather Requirements</h1><p>In order to make requests, you will need an API key and a zone ID.</p><p>Log in to Cloudflare and go to <em>My Profile</em>:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2022/03/CleanShot-2022-03-23-at-18.22.46@2x.png" class="kg-image" alt="Using the Cloudflare Logpull API with PowerShell" loading="lazy" width="2000" height="587" srcset="https://mrclixit.com/content/images/size/w600/2022/03/CleanShot-2022-03-23-at-18.22.46@2x.png 600w, https://mrclixit.com/content/images/size/w1000/2022/03/CleanShot-2022-03-23-at-18.22.46@2x.png 1000w, https://mrclixit.com/content/images/size/w1600/2022/03/CleanShot-2022-03-23-at-18.22.46@2x.png 1600w, https://mrclixit.com/content/images/size/w2400/2022/03/CleanShot-2022-03-23-at-18.22.46@2x.png 2400w" sizes="(min-width: 720px) 720px"><figcaption>View Cloudflare Profile</figcaption></figure><p>Go to <em>API Tokens </em>and then view your <em>Global API Key. </em>Save this for later:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2022/03/CleanShot-2022-03-23-at-18.28.00@2x.png" class="kg-image" alt="Using the Cloudflare Logpull API with PowerShell" loading="lazy" width="2000" height="918" srcset="https://mrclixit.com/content/images/size/w600/2022/03/CleanShot-2022-03-23-at-18.28.00@2x.png 600w, https://mrclixit.com/content/images/size/w1000/2022/03/CleanShot-2022-03-23-at-18.28.00@2x.png 1000w, https://mrclixit.com/content/images/size/w1600/2022/03/CleanShot-2022-03-23-at-18.28.00@2x.png 1600w, https://mrclixit.com/content/images/size/w2400/2022/03/CleanShot-2022-03-23-at-18.28.00@2x.png 2400w" sizes="(min-width: 720px) 720px"><figcaption>Retrieve Global API Key</figcaption></figure><p>Navigate to your Account and then choose your website you want to view logs for. Retrieve the Zone ID and save this for later:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2022/03/CleanShot-2022-03-23-at-18.35.22@2x-1.png" class="kg-image" alt="Using the Cloudflare Logpull API with PowerShell" loading="lazy" width="2000" height="1119" srcset="https://mrclixit.com/content/images/size/w600/2022/03/CleanShot-2022-03-23-at-18.35.22@2x-1.png 600w, https://mrclixit.com/content/images/size/w1000/2022/03/CleanShot-2022-03-23-at-18.35.22@2x-1.png 1000w, https://mrclixit.com/content/images/size/w1600/2022/03/CleanShot-2022-03-23-at-18.35.22@2x-1.png 1600w, https://mrclixit.com/content/images/size/w2400/2022/03/CleanShot-2022-03-23-at-18.35.22@2x-1.png 2400w" sizes="(min-width: 720px) 720px"><figcaption>Retrieve Zone ID</figcaption></figure><h1 id="enable-log-retention">Enable Log Retention</h1><p>HTTP request logs are not retained by default, so you will need to enable log retention before you can use the Logpull API.</p><p>You can check the status of log retention for your zone by running this in PowerShell (replacing variables with the values you retrieved earlier):</p><figure class="kg-card kg-code-card"><pre><code class="language-powershell">#Cloudflare API Key
$apiKey = &quot;YOUR_API_KEY_HERE&quot;
#Cloudflare Zone
$zoneId = &quot;YOUR_ZONE_ID_HERE&quot;
#Cloudflare Profile Email Address
$email = &quot;YOUR_EMAIL_ADDRESS_HERE&quot;
#Request Endpoint
$url = &quot;https://api.cloudflare.com/client/v4/zones/$zoneId/logs/control/retention/flag&quot;

#Required authentication headers
$headers = @{
    &quot;X-Auth-Key&quot;   = $apiKey
    &quot;X-Auth-Email&quot; = $email
    &quot;Content-Type&quot; = &quot;application/json&quot;
}

#Send request, store response
$response = Invoke-RestMethod -Method Get -Uri $url -Headers $headers

#Print response
$response</code></pre><figcaption>Check to see if log retention is enabled</figcaption></figure><p>If the <code>flag</code> in the response is set to <code>false</code>, you need to enable log retention. Run the following to enable log retention:</p><figure class="kg-card kg-code-card"><pre><code class="language-powershell">#Cloudflare API Key
$apiKey = &quot;YOUR_API_KEY_HERE&quot;
#Cloudflare Zone
$zoneId = &quot;YOUR_ZONE_ID_HERE&quot;
#Cloudflare Profile Email Address
$email = &quot;YOUR_EMAIL_ADDRESS_HERE&quot;
#Request Endpoint
$url = &quot;https://api.cloudflare.com/client/v4/zones/$zoneId/logs/control/retention/flag&quot;

#Required authentication headers
$headers = @{
    &quot;X-Auth-Key&quot;   = $apiKey
    &quot;X-Auth-Email&quot; = $email
    &quot;Content-Type&quot; = &quot;application/json&quot;
}

#Data payload
$body = @{
    &quot;flag&quot; = $true
} | ConvertTo-Json

#Send request, store response
$response = Invoke-RestMethod -Method Post -Uri $url -Headers $headers -Body $body

#Print response
$response</code></pre><figcaption>Enable log retention</figcaption></figure><h1 id="making-a-request">Making a Request</h1><p>With log retention enabled, you are ready to start making requests. You will want to review the available <a href="https://developers.cloudflare.com/logs/reference/log-fields/?ref=mrclixit.com">log fields</a> to customize your request to conform to your use case.</p><p>Here is an example of a request made to the <code>/logs/received</code> endpoint which will fetch the previous hour&apos;s worth of logs for your zone and save them to a .ndjson file locally:</p><figure class="kg-card kg-code-card"><pre><code class="language-powershell">#Specify filepath to export logs
$exportPath = &quot;C:\some\file\path.ndjson&quot;

#Cloudflare API Key
$apiKey = &quot;YOUR_API_KEY_HERE&quot;
#Cloudflare Zone
$zoneId = &quot;YOUR_ZONE_ID_HERE&quot;
#Cloudflare Profile Email Address
$email = &quot;YOUR_EMAIL_ADDRESS_HERE&quot;

#Get time from 1 hour ago in ISO 8601 format; e.g. 2022-03-23T02:30:19Z
$timeStart = (Get-Date -AsUTC).AddHours(-1).ToString(&quot;yyyy-MM-ddTHH:mm:ss&quot;) + &quot;Z&quot;
#Get time from 1 minute ago in ISO 8601 format; e.g. 2022-03-23T03:29:19Z
$timeEnd = (Get-Date -AsUTC).AddMinutes(-1).ToString(&quot;yyyy-MM-ddTHH:mm:ss&quot;) + &quot;Z&quot;

#Specify fields to return
$fields = &quot;ClientIP,ClientRequestHost,ClientRequestMethod,ClientRequestURI,EdgeEndTimestamp,EdgeResponseBytes,EdgeResponseStatus,EdgeStartTimestamp,RayID&quot;
#Request endpoint with parameters
$url = &quot;https://api.cloudflare.com/client/v4/zones/$zoneId/logs/received?start=$timeStart&amp;end=$timeEnd&amp;fields=$fields&quot;

#Required authentication headers
$headers = @{
    &quot;X-Auth-Key&quot;   = $apiKey
    &quot;X-Auth-Email&quot; = $email
    &quot;Content-Type&quot; = &quot;application/json&quot;
}

#Send request, store response
$response = Invoke-RestMethod -Method Get -Uri $url -Headers $headers

#Create .ndjson file at $exportPath if it doesn&apos;t already exist, add contents of response to file
if (!(Test-Path -Path $exportPath)) {
    New-Item -Path $exportPath
    Add-Content -Path $exportPath -Value $response
} else {
    Add-Content -Path $exportPath -Value $response
}</code></pre><figcaption>Fetch one hour&apos;s worth of logs and save to a .ndjson file locally</figcaption></figure><p>View the Cloudflare developer documentation for more information about <a href="https://developers.cloudflare.com/logs/logpull/requesting-logs/?ref=mrclixit.com">requesting logs</a> with the Logpull API, which includes all of the available <a href="https://developers.cloudflare.com/logs/reference/log-fields/?ref=mrclixit.com#http-requests">log fields</a> that are supported to customize your requests.</p>]]></content:encoded></item><item><title><![CDATA[Changing Source of Authority to Another Forest for Directory-Synced User Objects in M365]]></title><description><![CDATA[<p>The scenario here is that you have an M365 tenant which has multiple Active Directory forests synced to it, and you need to move a user&apos;s identity from its current forest into a different forest.</p><p>This isn&apos;t a very common occurence, but one that can come</p>]]></description><link>https://mrclixit.com/changing-source-of-authority-to-another-forest-for-directory-synced-user-objects-in-m365/</link><guid isPermaLink="false">6642a53e56d8380001d16197</guid><category><![CDATA[M365]]></category><category><![CDATA[PowerShell]]></category><category><![CDATA[Active Directory]]></category><dc:creator><![CDATA[Tim Murphy]]></dc:creator><pubDate>Mon, 21 Mar 2022 01:22:06 GMT</pubDate><media:content url="https://mrclixit.com/content/images/2022/03/change_forests-2.png" medium="image"/><content:encoded><![CDATA[<img src="https://mrclixit.com/content/images/2022/03/change_forests-2.png" alt="Changing Source of Authority to Another Forest for Directory-Synced User Objects in M365"><p>The scenario here is that you have an M365 tenant which has multiple Active Directory forests synced to it, and you need to move a user&apos;s identity from its current forest into a different forest.</p><p>This isn&apos;t a very common occurence, but one that can come as part of a merger or acquisition situation where an employee transfers to a different business unit which has a disconnected forest and is being synced to the same tenant.</p><p>This post assumes that you have the MSOnline PowerShell Module installed and that you can connect to it and that you are using a topology similar to this with Azure AD Connect and Azure AD Connect Cloud Sync:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2022/03/image.png" class="kg-image" alt="Changing Source of Authority to Another Forest for Directory-Synced User Objects in M365" loading="lazy" width="1244" height="913" srcset="https://mrclixit.com/content/images/size/w600/2022/03/image.png 600w, https://mrclixit.com/content/images/size/w1000/2022/03/image.png 1000w, https://mrclixit.com/content/images/2022/03/image.png 1244w" sizes="(min-width: 720px) 720px"><figcaption>Example topology of Azure AD architecture</figcaption></figure><hr><h1 id="convert-from-directory-synced-to-cloud-user-object">Convert from Directory-Synced to Cloud User Object</h1><p>First, we need to convert the user object into a Cloud identity so that it is not being directory-synced from Active Directory.</p><p>Here, we have user &apos;John Doe&apos; who is a directory-synced user:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2022/03/CleanShot-2022-03-20-at-14.22.25@2x.png" class="kg-image" alt="Changing Source of Authority to Another Forest for Directory-Synced User Objects in M365" loading="lazy" width="2000" height="452" srcset="https://mrclixit.com/content/images/size/w600/2022/03/CleanShot-2022-03-20-at-14.22.25@2x.png 600w, https://mrclixit.com/content/images/size/w1000/2022/03/CleanShot-2022-03-20-at-14.22.25@2x.png 1000w, https://mrclixit.com/content/images/size/w1600/2022/03/CleanShot-2022-03-20-at-14.22.25@2x.png 1600w, https://mrclixit.com/content/images/2022/03/CleanShot-2022-03-20-at-14.22.25@2x.png 2204w" sizes="(min-width: 720px) 720px"><figcaption>Example of directory-synced user account</figcaption></figure><ul><li>Move the user object such that it is out of scope from Azure AD Connect. Generally, this would be accomplished by moving the object to a non-syncing OU:</li></ul><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2022/03/moveUser.png" class="kg-image" alt="Changing Source of Authority to Another Forest for Directory-Synced User Objects in M365" loading="lazy" width="350" height="295"><figcaption>Move user to an OU that does not sync with Azure AD</figcaption></figure><ul><li>Force Azure AD Connect to sync by logging into your Azure AD Connect server and entering the following in an elevated PowerShell terminal:<br><code>Import-Module ADSync</code><br><code>Start-ADSyncSyncCycle -PolicyType Delta</code><br><br>The user object will now be in a soft-deleted state in M365:</li></ul><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2022/03/deletedUser.png" class="kg-image" alt="Changing Source of Authority to Another Forest for Directory-Synced User Objects in M365" loading="lazy" width="537" height="240"><figcaption>Example of a soft-deleted user account</figcaption></figure><ul><li>Run a second sync cycle: <code>Start-ADSyncSyncCycle -PolicyType Delta</code>. There is not a clear technical explanation I have come across as to why this is necessary, but just save yourself the headache and run it a second time. I spent many hours going down a troubleshooting rabbit hole on a Sev A case with Microsoft and they recommended this themselves.</li><li>Restore the user account: <code>Restore-MsolUser -UserPrincipalName john.doe@contoso.com</code></li></ul><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2022/03/CleanShot-2022-03-20-at-14.48.52@2x.png" class="kg-image" alt="Changing Source of Authority to Another Forest for Directory-Synced User Objects in M365" loading="lazy" width="1582" height="334" srcset="https://mrclixit.com/content/images/size/w600/2022/03/CleanShot-2022-03-20-at-14.48.52@2x.png 600w, https://mrclixit.com/content/images/size/w1000/2022/03/CleanShot-2022-03-20-at-14.48.52@2x.png 1000w, https://mrclixit.com/content/images/2022/03/CleanShot-2022-03-20-at-14.48.52@2x.png 1582w" sizes="(min-width: 720px) 720px"><figcaption>Restore deleted user via PowerShell</figcaption></figure><ul><li>Reset the user object&apos;s Immutable ID: <code>Set-MsolUser -UserPrincipalName john.doe@contoso.com -ImmutableId &quot;$null&quot;</code></li></ul><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2022/03/CleanShot-2022-03-20-at-18.25.27.png" class="kg-image" alt="Changing Source of Authority to Another Forest for Directory-Synced User Objects in M365" loading="lazy" width="1874" height="122" srcset="https://mrclixit.com/content/images/size/w600/2022/03/CleanShot-2022-03-20-at-18.25.27.png 600w, https://mrclixit.com/content/images/size/w1000/2022/03/CleanShot-2022-03-20-at-18.25.27.png 1000w, https://mrclixit.com/content/images/size/w1600/2022/03/CleanShot-2022-03-20-at-18.25.27.png 1600w, https://mrclixit.com/content/images/2022/03/CleanShot-2022-03-20-at-18.25.27.png 1874w" sizes="(min-width: 720px) 720px"><figcaption>Remove Immutable ID for user via PowerShell</figcaption></figure><p>The user&apos;s identity will now be managed exclusively by Azure AD and is no longer directory-synced:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://mrclixit.com/content/images/2022/03/CleanShot-2022-03-20-at-15.35.52@2x.png" class="kg-image" alt="Changing Source of Authority to Another Forest for Directory-Synced User Objects in M365" loading="lazy" width="2000" height="443" srcset="https://mrclixit.com/content/images/size/w600/2022/03/CleanShot-2022-03-20-at-15.35.52@2x.png 600w, https://mrclixit.com/content/images/size/w1000/2022/03/CleanShot-2022-03-20-at-15.35.52@2x.png 1000w, https://mrclixit.com/content/images/size/w1600/2022/03/CleanShot-2022-03-20-at-15.35.52@2x.png 1600w, https://mrclixit.com/content/images/2022/03/CleanShot-2022-03-20-at-15.35.52@2x.png 2196w" sizes="(min-width: 720px) 720px"><figcaption>Example of a Cloud-managed user account</figcaption></figure><h1 id="perform-matching-process-to-link-to-active-directory">Perform Matching Process to Link to Active Directory</h1><p>Now that the user identity is Cloud-managed, we can link it to the other Active Directory forest so that it becomes managed there. To do this, there are two options - either the soft matching or the hard matching process.</p><p>A <em>soft match</em> occurs when both the Primary SMTP Address and UserPrincipalName of the Cloud-managed object are the same as an on-premises object. A <em>hard match</em> occurs when the Immutable ID of a Cloud-managed object is equal to the Base64-encoded objectGuid of an on-premises object. This process is covered in more detail <a href="https://docs.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-install-existing-tenant?ref=mrclixit.com">here</a>.</p><p>When the match occurs, the attributes in Azure AD (as well as the account&apos;s password, if password hash sync is enabled) will be overwritten by whatever is in Active Directory for the user account. Ensure the desired information is in Active Directory for this user before matching.</p><p>For the purposes of this post we will be doing a soft match. </p><ul><li>Ensure that there is a user account in the other AD forest that has the same UserPrincipalName and proxyAddresses (just the primary SMTP) attributes as the Cloud-managed account.</li><li>Add the on-premises user account to the scope of what Azure AD Connect Cloud Sync is configured to sync (OU or Security Group). During the next sync cycle, the match will occur and the previously Cloud-managed account will become on-premises managed.</li></ul><p> </p>]]></content:encoded></item><item><title><![CDATA[How to Fix Missing Columns/Fields in SharePoint/Teams Lists after Migration]]></title><description><![CDATA[<p>After completing a tenant migration project, some Lists used within various Teams embedded as channel tabs were missing certain fields when trying to add a new item or edit an existing item.</p><p>All fields were showing, but when trying to create a new list item there were random fields missing</p>]]></description><link>https://mrclixit.com/how-to-fix-missing-fields-in-sharepoint-teams-lists-after-migration/</link><guid isPermaLink="false">6642a53e56d8380001d16194</guid><category><![CDATA[M365]]></category><category><![CDATA[SharePoint]]></category><category><![CDATA[Teams]]></category><category><![CDATA[Tenant Migration]]></category><dc:creator><![CDATA[Tim Murphy]]></dc:creator><pubDate>Thu, 10 Feb 2022 00:03:00 GMT</pubDate><media:content url="https://mrclixit.com/content/images/2022/02/sharepoint_lists.png" medium="image"/><content:encoded><![CDATA[<img src="https://mrclixit.com/content/images/2022/02/sharepoint_lists.png" alt="How to Fix Missing Columns/Fields in SharePoint/Teams Lists after Migration"><p>After completing a tenant migration project, some Lists used within various Teams embedded as channel tabs were missing certain fields when trying to add a new item or edit an existing item.</p><p>All fields were showing, but when trying to create a new list item there were random fields missing even though the old data was present and those columns were displayed.</p><p>The issue is most likely related to the Content Type these columns have assigned. To resolve this issue, first navigate to the &apos;List Settings&apos; in SharePoint:</p><figure class="kg-card kg-image-card"><img src="https://mrclixit.com/content/images/2022/02/CleanShot-2022-02-02-at-12.03.44.png" class="kg-image" alt="How to Fix Missing Columns/Fields in SharePoint/Teams Lists after Migration" loading="lazy" width="318" height="353"></figure><p>Next, go to &apos;Advanced Settings&apos;:</p><figure class="kg-card kg-image-card"><img src="https://mrclixit.com/content/images/2022/02/CleanShot-2022-02-02-at-12.05.42.png" class="kg-image" alt="How to Fix Missing Columns/Fields in SharePoint/Teams Lists after Migration" loading="lazy" width="229" height="270"></figure><p>Navigate to Content Types&gt;Allow management of content types? and select &apos;Yes&apos;. Click &apos;OK&apos; at the bottom of the page.</p><figure class="kg-card kg-image-card"><img src="https://mrclixit.com/content/images/2022/02/CleanShot-2022-02-02-at-12.08.37.png" class="kg-image" alt="How to Fix Missing Columns/Fields in SharePoint/Teams Lists after Migration" loading="lazy" width="569" height="205"></figure><p>Review your columns. For any fields that are missing, you should notice that they have a different Content Type than the others.</p><p>Click the Content Type which is assigned to all of your working columns/fields:</p><figure class="kg-card kg-image-card"><img src="https://mrclixit.com/content/images/2022/02/CleanShot-2022-02-02-at-12.52.18.png" class="kg-image" alt="How to Fix Missing Columns/Fields in SharePoint/Teams Lists after Migration" loading="lazy" width="1179" height="141" srcset="https://mrclixit.com/content/images/size/w600/2022/02/CleanShot-2022-02-02-at-12.52.18.png 600w, https://mrclixit.com/content/images/size/w1000/2022/02/CleanShot-2022-02-02-at-12.52.18.png 1000w, https://mrclixit.com/content/images/2022/02/CleanShot-2022-02-02-at-12.52.18.png 1179w" sizes="(min-width: 720px) 720px"></figure><p>Click &apos;Add from existing site or list columns&apos;:</p><figure class="kg-card kg-image-card"><img src="https://mrclixit.com/content/images/2022/02/CleanShot-2022-02-02-at-13.05.55.png" class="kg-image" alt="How to Fix Missing Columns/Fields in SharePoint/Teams Lists after Migration" loading="lazy" width="1443" height="944" srcset="https://mrclixit.com/content/images/size/w600/2022/02/CleanShot-2022-02-02-at-13.05.55.png 600w, https://mrclixit.com/content/images/size/w1000/2022/02/CleanShot-2022-02-02-at-13.05.55.png 1000w, https://mrclixit.com/content/images/2022/02/CleanShot-2022-02-02-at-13.05.55.png 1443w" sizes="(min-width: 720px) 720px"></figure><p>Now, select the column(s) that were missing and then click &apos;Add&apos; followed by &apos;OK&apos;:</p><figure class="kg-card kg-image-card"><img src="https://mrclixit.com/content/images/2022/02/CleanShot-2022-02-02-at-13.07.51.png" class="kg-image" alt="How to Fix Missing Columns/Fields in SharePoint/Teams Lists after Migration" loading="lazy" width="1493" height="458" srcset="https://mrclixit.com/content/images/size/w600/2022/02/CleanShot-2022-02-02-at-13.07.51.png 600w, https://mrclixit.com/content/images/size/w1000/2022/02/CleanShot-2022-02-02-at-13.07.51.png 1000w, https://mrclixit.com/content/images/2022/02/CleanShot-2022-02-02-at-13.07.51.png 1493w" sizes="(min-width: 720px) 720px"></figure><p>At this point, you should be able to create a new List item and all columns/fields will properly display as input options. </p><p>You may need to adjust the column order if it is not displaying in the order you would like. Simply change this under &apos;Column order&apos; and adjust accordingly.</p><p>Now you can go back to List settings&gt;Advanced settings and change &apos;Allow management of content types?&apos; back to &apos;No&apos; and then click &apos;OK&apos;:</p><figure class="kg-card kg-image-card"><img src="https://mrclixit.com/content/images/2022/02/CleanShot-2022-02-02-at-13.14.31.png" class="kg-image" alt="How to Fix Missing Columns/Fields in SharePoint/Teams Lists after Migration" loading="lazy" width="562" height="201"></figure>]]></content:encoded></item><item><title><![CDATA[CarbonBlackPS | A PowerShell Module for Carbon Black]]></title><description><![CDATA[<h1></h1><p>CarbonBlackPS is a PowerShell module for Carbon Black that I threw together over the course of a couple weekends in early 2021. This was one of the first modules I wrote and something that has saved me and my team a lot of time.</p><p>The project is available for download</p>]]></description><link>https://mrclixit.com/carbonblackps-carbon-black-powershell-module/</link><guid isPermaLink="false">6642a53e56d8380001d16195</guid><category><![CDATA[Carbon Black]]></category><category><![CDATA[Security]]></category><category><![CDATA[PowerShell]]></category><category><![CDATA[SecOps]]></category><category><![CDATA[Automation]]></category><dc:creator><![CDATA[Tim Murphy]]></dc:creator><pubDate>Thu, 03 Feb 2022 04:37:03 GMT</pubDate><media:content url="https://mrclixit.com/content/images/2022/02/carbonblackps.png" medium="image"/><content:encoded><![CDATA[<h1></h1><img src="https://mrclixit.com/content/images/2022/02/carbonblackps.png" alt="CarbonBlackPS | A PowerShell Module for Carbon Black"><p>CarbonBlackPS is a PowerShell module for Carbon Black that I threw together over the course of a couple weekends in early 2021. This was one of the first modules I wrote and something that has saved me and my team a lot of time.</p><p>The project is available for download on <a href="https://github.com/timothymmurphy/CarbonBlackPS?ref=mrclixit.com">Github</a> and <a href="https://www.powershellgallery.com/packages/CarbonBlackPS/?ref=mrclixit.com">PowerShell Gallery</a> and works with either Windows PowerShell or PowerShell Core.</p><hr><h1 id="carbon-black-setup">Carbon Black Setup</h1><p>To interact with the Carbon Black API, you need to authenticate your requests with several parameters which are defined in the <a href="https://developer.carbonblack.com/reference/carbon-black-cloud/authentication/?ref=mrclixit.com">API docs</a>.</p><ul><li>Log in to your Carbon Black Cloud console. Make note of the web address as you will need it for later. This is your <em>environment</em>:</li></ul><figure class="kg-card kg-image-card"><img src="https://mrclixit.com/content/images/2022/02/CleanShot-2022-02-02-at-20.24.24-6.png" class="kg-image" alt="CarbonBlackPS | A PowerShell Module for Carbon Black" loading="lazy" width="291" height="38"></figure><ul><li>Navigate to Settings&gt;API Access</li></ul><figure class="kg-card kg-image-card"><img src="https://mrclixit.com/content/images/2022/02/CleanShot-2022-02-02-at-20.31.35.png" class="kg-image" alt="CarbonBlackPS | A PowerShell Module for Carbon Black" loading="lazy" width="180" height="301"></figure><ul><li>Navigate to &apos;Access Levels&apos; and click &apos;Add Access Level&apos;</li></ul><figure class="kg-card kg-image-card"><img src="https://mrclixit.com/content/images/2022/02/CleanShot-2022-02-02-at-20.38.36.png" class="kg-image" alt="CarbonBlackPS | A PowerShell Module for Carbon Black" loading="lazy" width="1083" height="158" srcset="https://mrclixit.com/content/images/size/w600/2022/02/CleanShot-2022-02-02-at-20.38.36.png 600w, https://mrclixit.com/content/images/size/w1000/2022/02/CleanShot-2022-02-02-at-20.38.36.png 1000w, https://mrclixit.com/content/images/2022/02/CleanShot-2022-02-02-at-20.38.36.png 1083w" sizes="(min-width: 720px) 720px"></figure><ul><li>Enter a Name and Description along with the necessary permissions to interact with the various endpoints you plan to make use of. This can be adjusted later if needed.</li></ul><figure class="kg-card kg-image-card"><img src="https://mrclixit.com/content/images/2022/02/CleanShot-2022-02-02-at-20.41.26.png" class="kg-image" alt="CarbonBlackPS | A PowerShell Module for Carbon Black" loading="lazy" width="1207" height="605" srcset="https://mrclixit.com/content/images/size/w600/2022/02/CleanShot-2022-02-02-at-20.41.26.png 600w, https://mrclixit.com/content/images/size/w1000/2022/02/CleanShot-2022-02-02-at-20.41.26.png 1000w, https://mrclixit.com/content/images/2022/02/CleanShot-2022-02-02-at-20.41.26.png 1207w" sizes="(min-width: 720px) 720px"></figure><ul><li>Navigate to &apos;API Keys&apos; and make note of your <em>Org Key</em> and click &apos;Add API Key&apos;</li></ul><figure class="kg-card kg-image-card"><img src="https://mrclixit.com/content/images/2022/02/CleanShot-2022-02-02-at-20.34.50.png" class="kg-image" alt="CarbonBlackPS | A PowerShell Module for Carbon Black" loading="lazy" width="1084" height="155" srcset="https://mrclixit.com/content/images/size/w600/2022/02/CleanShot-2022-02-02-at-20.34.50.png 600w, https://mrclixit.com/content/images/size/w1000/2022/02/CleanShot-2022-02-02-at-20.34.50.png 1000w, https://mrclixit.com/content/images/2022/02/CleanShot-2022-02-02-at-20.34.50.png 1084w" sizes="(min-width: 720px) 720px"></figure><ul><li>Enter a Name and Description and then select &apos;Custom&apos; for the &apos;Access Level type&apos; and select the name of the Access Level you created in the previous step for &apos;Custom Access Level&apos;.</li></ul><figure class="kg-card kg-image-card"><img src="https://mrclixit.com/content/images/2022/02/CleanShot-2022-02-02-at-21.00.59.png" class="kg-image" alt="CarbonBlackPS | A PowerShell Module for Carbon Black" loading="lazy" width="794" height="624" srcset="https://mrclixit.com/content/images/size/w600/2022/02/CleanShot-2022-02-02-at-21.00.59.png 600w, https://mrclixit.com/content/images/2022/02/CleanShot-2022-02-02-at-21.00.59.png 794w" sizes="(min-width: 720px) 720px"></figure><ul><li>Click &apos;Save&apos; and your <em>API ID</em> and <em>API Secret Key</em> will be displayed. Make note of these as you will need them shortly.</li></ul><figure class="kg-card kg-image-card"><img src="https://mrclixit.com/content/images/2022/02/CleanShot-2022-02-02-at-21.04.27.png" class="kg-image" alt="CarbonBlackPS | A PowerShell Module for Carbon Black" loading="lazy" width="487" height="210"></figure><h1 id="powershell-module-setup">PowerShell Module Setup</h1><p>To install the module, simply open PowerShell and then enter the following command: <code>Install-Module -Name CarbonBlackPS</code></p><p>After installing, import the module by running the following command: <code>Import-Module CarbonBlackPS</code></p><p>Next, run <code>Set-CbConfig</code> to create your config.json file with the values you obtained from the previous section. Here is an example: <code>Set-CbConfig -Environment &quot;<a href="https://defense-prod05.conferdeploy.net/?ref=mrclixit.com">https://defense-prod05.conferdeploy.net</a>&quot; -ApiSecret &quot;YOUR_API_SECRET&quot; -ApiID &quot;YOUR_API_ID&quot; -OrgKey &quot;YOUR_ORG_KEY&quot;</code></p><p>This will create a config.json file in the root of your module&apos;s directory with your Environment, API Secret Key, API ID, and Org Key. After you run <code>Set-CbConfig</code> with the proper parameters you fetched earlier, you are ready to use this module.</p><h1 id="command-help-and-examples">Command Help and Examples</h1><p>To get a list of commands, run <code>Get-Command -Module CarbonBlackPS</code>.</p><p>To get help about any particular function, run <code>Get-Help &lt;commandname&gt; -Detailed</code>.</p><p>To return examples of a particular command, run <code>Get-Help &lt;commandname&gt; -Examples</code>.</p><h1></h1>]]></content:encoded></item></channel></rss>