<?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:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sarah Nmachi on Medium]]></title>
        <description><![CDATA[Stories by Sarah Nmachi on Medium]]></description>
        <link>https://medium.com/@sarahnmachi?source=rss-619c0bf9d288------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ck1JslLC8pdmyD8IuhwXGg.png</url>
            <title>Stories by Sarah Nmachi on Medium</title>
            <link>https://medium.com/@sarahnmachi?source=rss-619c0bf9d288------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 06:39:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sarahnmachi/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Auto Connect a virtual network to a Virtual WAN hub — Azure Policy]]></title>
            <link>https://sarahnmachi.medium.com/auto-connect-a-virtual-network-to-a-virtual-wan-hub-azure-policy-8b1e216671fa?source=rss-619c0bf9d288------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b1e216671fa</guid>
            <category><![CDATA[azure-virtual-wan]]></category>
            <category><![CDATA[azure-virtual-network]]></category>
            <category><![CDATA[azure-policies]]></category>
            <dc:creator><![CDATA[Sarah Nmachi]]></dc:creator>
            <pubDate>Tue, 18 Feb 2025 09:42:16 GMT</pubDate>
            <atom:updated>2025-02-18T09:42:16.457Z</atom:updated>
            <content:encoded><![CDATA[<h3>Auto Connect a virtual network to a Virtual WAN hub — Azure Policy</h3><p>There are several reasons why you may need to automatically <a href="https://learn.microsoft.com/en-us/azure/virtual-wan/howto-connect-vnet-hub">connect a VNet to a Virtual WAN hub</a>, one being RBAC. For example, you may need to grant permissions to a subset of users.</p><p>You want to prevent them from making changes to the VWAN while still allowing them to create a VNet. Alternatively, you may simply want to automate the process and minimize manual configuration.</p><p>From the image below, one of my users has read access and permission to create a VNet but cannot make any changes to the VWAN.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/543/1*fsvLiV2YiH7OLEfBs6mEwg.jpeg" /></figure><p>There are different approaches to doing this, however, I will be using the <a href="https://learn.microsoft.com/en-us/azure/governance/policy/samples/pattern-deploy-resources">Azure Policy</a> method. This will mark resources as compliant or non-compliant if they are not connected to the Virtual WAN hub.</p><p>In this example, we’ll create a policy that looks for a VNet with a specific tag and connects it to the Virtual WAN hub called ‘hub1’ if it’s not already there.</p><pre>{<br>  &quot;mode&quot;: &quot;All&quot;,<br>  &quot;policyRule&quot;: {<br>    &quot;if&quot;: {<br>      &quot;allOf&quot;: [<br>        {<br>          &quot;field&quot;: &quot;type&quot;,<br>          &quot;equals&quot;: &quot;Microsoft.Network/virtualNetworks&quot;<br>        },<br>        {<br>          &quot;field&quot;: &quot;[concat(&#39;tags[&#39;, parameters(&#39;tagName&#39;), &#39;]&#39;)]&quot;,<br>          &quot;equals&quot;: &quot;[parameters(&#39;tagValue&#39;)]&quot;<br>        }<br>      ]<br>    },<br>    &quot;then&quot;: {<br>      &quot;effect&quot;: &quot;deployIfNotExists&quot;,<br>      &quot;details&quot;: {<br>        &quot;type&quot;: &quot;Microsoft.Network/virtualNetworks/virtualNetworkPeerings&quot;,<br>        &quot;existenceCondition&quot;: {<br>          &quot;allOf&quot;: [<br>            {<br>              &quot;field&quot;: &quot;Microsoft.Network/virtualNetworks/virtualNetworkPeerings/peeringState&quot;,<br>              &quot;equals&quot;: &quot;Connected&quot;<br>            },<br>            {<br>              &quot;field&quot;: &quot;Microsoft.Network/virtualNetworks/virtualNetworkPeerings/remoteVirtualNetwork.id&quot;,<br>              &quot;equals&quot;: &quot;/subscriptions/ecb45ffe-d48c-4678-af61-957f8f55bf6a/resourceGroups/RG_hub1_f9893628-d411-46a2-a6f7-73c047ed1495/providers/Microsoft.Network/virtualNetworks/HV_hub1_c452c370-dd4b-43f0-ae0c-f7e763ea4e67&quot;<br>            }<br>          ]<br>        },<br>        &quot;deployment&quot;: {<br>          &quot;properties&quot;: {<br>            &quot;mode&quot;: &quot;Incremental&quot;,<br>            &quot;parameters&quot;: {<br>              &quot;virtualNetworkName&quot;: {<br>                &quot;value&quot;: &quot;[field(&#39;name&#39;)]&quot;<br>              },<br>              &quot;vhubResourceGroup&quot;: {<br>                &quot;value&quot;: &quot;[parameters(&#39;vhubResourceGroup&#39;)]&quot;<br>              },<br>              &quot;vhubName&quot;: {<br>                &quot;value&quot;: &quot;[parameters(&#39;vhubName&#39;)]&quot;<br>              },<br>              &quot;vhubSubscriptionId&quot;: {<br>                &quot;value&quot;: &quot;[parameters(&#39;vhubSubscriptionId&#39;)]&quot;<br>              }<br>            },<br>            &quot;template&quot;: {<br>              &quot;$schema&quot;: &quot;https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#&quot;,<br>              &quot;contentVersion&quot;: &quot;1.0.0.0&quot;,<br>              &quot;parameters&quot;: {<br>                &quot;virtualNetworkName&quot;: {<br>                  &quot;type&quot;: &quot;string&quot;<br>                },<br>                &quot;vhubResourceGroup&quot;: {<br>                  &quot;type&quot;: &quot;string&quot;<br>                },<br>                &quot;vhubName&quot;: {<br>                  &quot;type&quot;: &quot;string&quot;<br>                },<br>                &quot;vhubSubscriptionId&quot;: {<br>                  &quot;type&quot;: &quot;string&quot;<br>                }<br>              },<br>              &quot;variables&quot;: {},<br>              &quot;resources&quot;: [<br>                {<br>                  &quot;type&quot;: &quot;Microsoft.Resources/deployments&quot;,<br>                  &quot;apiVersion&quot;: &quot;2024-11-01&quot;,<br>                  &quot;name&quot;: &quot;nestedDeployment&quot;,<br>                  &quot;resourceGroup&quot;: &quot;[parameters(&#39;vhubResourceGroup&#39;)]&quot;,<br>                  &quot;subscriptionId&quot;: &quot;[parameters(&#39;vhubSubscriptionId&#39;)]&quot;,<br>                  &quot;properties&quot;: {<br>                    &quot;mode&quot;: &quot;Incremental&quot;,<br>                    &quot;template&quot;: {<br>                      &quot;$schema&quot;: &quot;https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#&quot;,<br>                      &quot;contentVersion&quot;: &quot;1.0.0.0&quot;,<br>                      &quot;resources&quot;: [<br>                        {<br>                          &quot;type&quot;: &quot;Microsoft.Network/virtualHubs/hubVirtualNetworkConnections&quot;,<br>                          &quot;apiVersion&quot;: &quot;2024-05-01&quot;,<br>                          &quot;name&quot;: &quot;[concat(parameters(&#39;vhubName&#39;), &#39;/connection-NE-&#39;, parameters(&#39;virtualNetworkName&#39;))]&quot;,<br>                          &quot;location&quot;: &quot;northeurope&quot;,<br>                          &quot;properties&quot;: {<br>                            &quot;remoteVirtualNetwork&quot;: {<br>                              &quot;id&quot;: &quot;[resourceId(&#39;Microsoft.Network/virtualNetworks&#39;, parameters(&#39;virtualNetworkName&#39;))]&quot;<br>                            },<br>                            &quot;allowHubToRemoteVnetTransit&quot;: true,<br>                            &quot;allowRemoteVnetToUseHubVnetGateways&quot;: true,<br>                            &quot;enableInternetSecurity&quot;: false<br>                          }<br>                        }<br>                      ]<br>                    }<br>                  }<br>                }<br>              ]<br>            }<br>          }<br>        },<br>        &quot;roleDefinitionIds&quot;: [<br>          &quot;/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7&quot;<br>        ]<br>      }<br>    }<br>  },<br>  &quot;parameters&quot;: {<br>    &quot;tagName&quot;: {<br>      &quot;type&quot;: &quot;String&quot;,<br>      &quot;metadata&quot;: {<br>        &quot;displayName&quot;: &quot;tagName&quot;,<br>        &quot;description&quot;: &quot;The name of the tag to check for&quot;<br>      },<br>      &quot;defaultValue&quot;: &quot;vnetconnect&quot;<br>    },<br>    &quot;tagValue&quot;: {<br>      &quot;type&quot;: &quot;String&quot;,<br>      &quot;metadata&quot;: {<br>        &quot;displayName&quot;: &quot;tagValue&quot;,<br>        &quot;description&quot;: &quot;The value of the tag to check for&quot;<br>      },<br>      &quot;defaultValue&quot;: &quot;true&quot;<br>    },<br>    &quot;vhubResourceGroup&quot;: {<br>      &quot;type&quot;: &quot;String&quot;,<br>      &quot;metadata&quot;: {<br>        &quot;displayName&quot;: &quot;vhubResourceGroup&quot;,<br>        &quot;description&quot;: &quot;The resource group where the virtual hub is located&quot;<br>      },<br>      &quot;defaultValue&quot;: &quot;carg&quot;<br>    },<br>    &quot;vhubSubscriptionId&quot;: {<br>      &quot;type&quot;: &quot;String&quot;,<br>      &quot;metadata&quot;: {<br>        &quot;displayName&quot;: &quot;vhubSubscriptionId&quot;,<br>        &quot;description&quot;: &quot;The Subscription where the virtual hub is located&quot;<br>      },<br>      &quot;defaultValue&quot;: &quot;8249ba23-af65-4267-801d-73076c5795a5&quot;<br>    },<br>    &quot;vhubName&quot;: {<br>      &quot;type&quot;: &quot;String&quot;,<br>      &quot;metadata&quot;: {<br>        &quot;displayName&quot;: &quot;vhubName&quot;,<br>        &quot;description&quot;: &quot;The name of the virtual hub&quot;<br>      },<br>      &quot;defaultValue&quot;: &quot;hub1&quot;<br>    }<br>  }<br>}</pre><p>Let’s break this down</p><pre>if&quot;: {<br>      &quot;allOf&quot;: [<br>        {<br>          &quot;field&quot;: &quot;type&quot;,<br>          &quot;equals&quot;: &quot;Microsoft.Network/virtualNetworks&quot;<br>        },<br>        {<br>          &quot;field&quot;: &quot;[concat(&#39;tags[&#39;, parameters(&#39;tagName&#39;), &#39;]&#39;)]&quot;,<br>          &quot;equals&quot;: &quot;[parameters(&#39;tagValue&#39;)]&quot;<br>        }<br>      ]<br>    }</pre><p>The if condition above checks for the resources that are to be evaluated. It verifies if the tag exists and if it is equal to the tag value specified in my default parameter, which can always be changed.</p><pre> &quot;effect&quot;: &quot;deployIfNotExists&quot;,<br>      &quot;details&quot;: {<br>        &quot;type&quot;: &quot;Microsoft.Network/virtualNetworks/virtualNetworkPeerings&quot;,<br>        &quot;existenceCondition&quot;: {<br>          &quot;allOf&quot;: [<br>            {<br>              &quot;field&quot;: &quot;Microsoft.Network/virtualNetworks/virtualNetworkPeerings/peeringState&quot;,<br>              &quot;equals&quot;: &quot;Connected&quot;<br>            },<br>            {<br>              &quot;field&quot;: &quot;Microsoft.Network/virtualNetworks/virtualNetworkPeerings/remoteVirtualNetwork.id&quot;,<br>              &quot;equals&quot;: &quot;/subscriptions/ecb45ffe-d48c-4678-af61-957f8f55bf6a/resourceGroups/RG_hub1_f9893628-d411-46a2-a6f7-73c047ed1495/providers/Microsoft.Network/virtualNetworks/HV_hub1_c452c370-dd4b-43f0-ae0c-f7e763ea4e67&quot;<br>            }<br>          ]<br>        },</pre><p>The deployIfNotExists effect includes an existenceCondition that checks if the virtual network peering is in the Connected state and if the remoteVirtualNetwork.id matches the specified virtual network resource ID, ensuring the peering is correctly established between the networks.</p><p>To get the remoteVirtualNetwork.id that was used, similar to mine, one method is to query an already created peering to hub1 using the following command:</p><pre>Get-AzVirtualNetwork -ResourceGroupName &#39;rgName&#39; -Name &#39;virtualNetworkName&#39; |  <br>    Select-Object -ExpandProperty VirtualNetworkPeerings |  <br>    Select-Object -ExpandProperty RemoteVirtualNetwork |  <br>    Select-Object Id</pre><p>I tried my best not to use any hardcoding, but I haven’t figured out a workaround yet. Moving on, if the condition is met, the resource is marked as compliant. If it doesn’t meet the condition, the process moves to the next stage, which triggers a deployment to create the required resource.</p><pre>&quot;deployment&quot;: {<br>          &quot;properties&quot;: {<br>            &quot;mode&quot;: &quot;Incremental&quot;,<br>            &quot;parameters&quot;: {<br>              &quot;virtualNetworkName&quot;: {<br>                &quot;value&quot;: &quot;[field(&#39;name&#39;)]&quot;<br>              },<br>              &quot;vhubResourceGroup&quot;: {<br>                &quot;value&quot;: &quot;[parameters(&#39;vhubResourceGroup&#39;)]&quot;<br>              },<br>              &quot;vhubName&quot;: {<br>                &quot;value&quot;: &quot;[parameters(&#39;vhubName&#39;)]&quot;<br>              },<br>              &quot;vhubSubscriptionId&quot;: {<br>                &quot;value&quot;: &quot;[parameters(&#39;vhubSubscriptionId&#39;)]&quot;<br>              }<br>            },<br>            &quot;template&quot;: {<br>              &quot;$schema&quot;: &quot;https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#&quot;,<br>              &quot;contentVersion&quot;: &quot;1.0.0.0&quot;,<br>              &quot;parameters&quot;: {<br>                &quot;virtualNetworkName&quot;: {<br>                  &quot;type&quot;: &quot;string&quot;<br>                },<br>                &quot;vhubResourceGroup&quot;: {<br>                  &quot;type&quot;: &quot;string&quot;<br>                },<br>                &quot;vhubName&quot;: {<br>                  &quot;type&quot;: &quot;string&quot;<br>                },<br>                &quot;vhubSubscriptionId&quot;: {<br>                  &quot;type&quot;: &quot;string&quot;<br>                }<br>              },<br>              &quot;variables&quot;: {},<br>              &quot;resources&quot;: [<br>                {<br>                  &quot;type&quot;: &quot;Microsoft.Resources/deployments&quot;,<br>                  &quot;apiVersion&quot;: &quot;2024-11-01&quot;,<br>                  &quot;name&quot;: &quot;nestedDeployment&quot;,<br>                  &quot;resourceGroup&quot;: &quot;[parameters(&#39;vhubResourceGroup&#39;)]&quot;,<br>                  &quot;subscriptionId&quot;: &quot;[parameters(&#39;vhubSubscriptionId&#39;)]&quot;,<br>                  &quot;properties&quot;: {<br>                    &quot;mode&quot;: &quot;Incremental&quot;,<br>                    &quot;template&quot;: {<br>                      &quot;$schema&quot;: &quot;https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#&quot;,<br>                      &quot;contentVersion&quot;: &quot;1.0.0.0&quot;,<br>                      &quot;resources&quot;: [<br>                        {<br>                          &quot;type&quot;: &quot;Microsoft.Network/virtualHubs/hubVirtualNetworkConnections&quot;,<br>                          &quot;apiVersion&quot;: &quot;2024-05-01&quot;,<br>                          &quot;name&quot;: &quot;[concat(parameters(&#39;vhubName&#39;), &#39;/connection-NE-&#39;, parameters(&#39;virtualNetworkName&#39;))]&quot;,<br>                          &quot;location&quot;: &quot;northeurope&quot;,<br>                          &quot;properties&quot;: {<br>                            &quot;remoteVirtualNetwork&quot;: {<br>                              &quot;id&quot;: &quot;[resourceId(&#39;Microsoft.Network/virtualNetworks&#39;, parameters(&#39;virtualNetworkName&#39;))]&quot;<br>                            },<br>                            &quot;allowHubToRemoteVnetTransit&quot;: true,<br>                            &quot;allowRemoteVnetToUseHubVnetGateways&quot;: true,<br>                            &quot;enableInternetSecurity&quot;: false<br>                          }<br>                        }<br>                      ]<br>                    }<br>                  }<br>                }<br>              ]<br>            }<br>          }<br>        },</pre><p>This template contains a <strong>nested deployment</strong> to allow deployment into a <strong>different subscription and resource group</strong> than the one where the main template is executed.</p><p>The nested deployment ensures that the <strong>hub-to-VNet connection</strong> is created in the specified vhubSubscriptionId and vhubResourceGroup. Without the nested deployment, you’ll run into an error if the virtual network is created in a different subscription or resource group.</p><p>I found this article <a href="https://learn.microsoft.com/en-gb/azure/azure-resource-manager/templates/linked-templates?WT.mc_id=devopslab-c9-cxa&amp;tabs=azure-powershell">Link templates for deployment — Azure Resource Manager | Microsoft Learn</a> and video(<a href="https://learn.microsoft.com/en-us/shows/devops-lab/arm-series-8-linked-and-nested-templates">ARM Series #8: Linked and Nested Templates</a>) from the Devops Lab really helpful and would recommend it if you’re struggling with understanding what a nested deployment is.</p><p>The template also accepts several inputs to decide where and how the resources are deployed:</p><ul><li>virtualNetworkName: Name of the virtual network (VNet) being connected.</li><li>vhubResourceGroup: Resource group where the vHub exists.</li><li>vhubName: Name of the Virtual Hub in Azure.</li><li>vhubSubscriptionId: Subscription ID where the vHub is deployed</li></ul><p>Finally the roleDefinitionIds property is defining the <strong>Azure Role-Based Access Control (RBAC) role(s)</strong> required for the policy assignment. The ID specified below corresponds to the N<strong>etwork Contributor</strong> role in Azure.</p><pre>&quot;roleDefinitionIds&quot;: [<br>          &quot;/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7&quot;</pre><p>For more information about azure built in roles id <a href="https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles">https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles</a></p><p>Azure Policy can take a bit of time to deploy, and you might need to do some remediation for existing resources. It requires patience since you might not see the results immediately. You can always check the activity logs in Azure Monitor and keep an eye out for the ‘deploynotexist’ log.</p><p>If you are not patient enough, you may also follow the step in Daniels blog <a href="https://www.danielstechblog.io/trigger-an-on-demand-azure-policy-compliance-evaluation-scan/">Trigger an on-demand Azure Policy compliance evaluation scan</a>.</p><p>This is what it should look like in the Portal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m6CoihO6RTTnKD3fnz97Tw.png" /></figure><p>I hope this proves useful! Feel free to leave a comment if you have any thoughts or feedback.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b1e216671fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Improving File Upload Reliability in SharePoint with Power Automate: A ‘Do Until’ Approach]]></title>
            <link>https://sarahnmachi.medium.com/improving-file-upload-reliability-in-sharepoint-with-power-automate-a-do-until-approach-b7b108a2387b?source=rss-619c0bf9d288------2</link>
            <guid isPermaLink="false">https://medium.com/p/b7b108a2387b</guid>
            <category><![CDATA[sharepoint]]></category>
            <category><![CDATA[power-automate]]></category>
            <category><![CDATA[powerplatform]]></category>
            <category><![CDATA[microsoft-365]]></category>
            <category><![CDATA[sharepoint-online]]></category>
            <dc:creator><![CDATA[Sarah Nmachi]]></dc:creator>
            <pubDate>Mon, 22 May 2023 09:53:34 GMT</pubDate>
            <atom:updated>2023-05-22T10:12:33.951Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>I’m working on copying files from a public SharePoint site to a private SharePoint site as soon as they are uploaded, and then deleting them from the original location. After receiving an email notification from my Power Automate flow stating that the file upload has been completed and received, I eagerly check in SharePoint, only to discover that the upload was either canceled or failed.</blockquote><p>When it comes to SharePoint, there are various reasons why you might need to move files between Sites. One common scenario is when you have a SharePoint document link that is only available to the public for a limited time, such as 24 hours. To ensure the security of sensitive information being uploaded, moving these files and restricting their availability to the public becomes necessary.</p><p>This article delves into an effective approach to enhance file upload reliability in SharePoint by leveraging Power Automate and implementing a ‘Do Until’ loop. It focuses on overcoming the challenge of minimizing failures and ensuring successful file transfers between SharePoint sites, especially when handling large files. By harnessing the power of Power Automate and employing a ‘Do Until’ loop, organizations can significantly improve the overall efficiency and reliability of their SharePoint file upload processes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/543/1*KSvQi8otjUm27Y4lGCFwSg.png" /><figcaption>Fig 1</figcaption></figure><p>From the Snip Above in Fig 1, we implemented a simple Power Automate flow that triggers when a file is uploaded to a SharePoint list.</p><p>While this flow appears to be straightforward and functional, it has a limitation. When uploading large files to the SharePoint document library, the flow executes successfully, but the file upload fails.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/341/1*CW1CfhpvUTAKF6R1oUitJQ.png" /><figcaption>Fig 2</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XJMBNHYhE-uMkEJ69ouKKA.png" /><figcaption>Fig 3</figcaption></figure><p>If we look at the time stamp of Fig 2 and Fig 3 , we can see that while Power Automate Flow ran successfully, SharePoint Upload Fails.</p><p>This issue arises because Power Automate copies the file properties, leading to the creation, copying, and deletion processes occurring almost instantly before the upload is complete.</p><p>Solution:<br>To overcome this issue, we can incorporate a “do until” condition into the flow. By adding a condition, we can periodically check if the file has finished uploading, allowing us to synchronize the flow accordingly. In this article, we will demonstrate how to implement this solution using a 5-minute interval.</p><p>Within the flow, we will focus on monitoring the file metadata as an indicator of completion. The file metadata remains at zero until the upload process is fully completed. The steps involved in the above solution are as follows:</p><p>Variable Initialization:<br> — Initialize a variable named “metadata” to track the file metadata.</p><p>Do Until Condition:<br> — Create a “do until” condition that runs every 5 minutes for a duration of 1 hour.<br> — To verify whether the file metadata is still zero within the condition, retrieve the size of the file metadata(Get File metadata) and assign it to the `initialized` variable (Set Variable).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/573/1*ePGWhGosJcW6X6ancz5fFw.png" /><figcaption>Fig 4</figcaption></figure><p>Condition Control</p><p>Create an If Statement. This runs after the Do Until Condition<br> — If the DO UNTIL condition times out and the metadata remains zero, you can choose to either take no action (do nothing) or go the extra mile by sending a notification to indicate that the upload was canceled or failed.<br> — If the metadata is not zero, perform the following tasks: copy the file to the internal site, delete the file from the public site, and finally, send an email to confirm the successful upload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zI1q1FrbXwcUmtLjND2b1w.png" /><figcaption>Fig 5</figcaption></figure><p>Conclusion:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hQ5xR6AuvZsB_Tz3219jQA.png" /><figcaption>Fig 6</figcaption></figure><p>By incorporating a “do until” Condition with periodic checks for file metadata, we can ensure that the file upload process in SharePoint using Power Automate is efficient and reliable. Please <strong>Note </strong>that there may be other ways to approach this issue however this is my current approach to solve this issue.</p><p>It is important to note that the duration and frequency of the condition can be adjusted based on specific requirements. For more detailed information on implementing the “do until” condition, refer to the provided <a href="https://github.com/MicrosoftDocs/power-automate-docs/blob/main/articles/dataverse/create-update-delete-trigger.md#wait-condition-using-delay-until">Microsoft Documentation</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b7b108a2387b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PATCH() DOES NOT CREATE RECORDS ON SHAREPOINT — FIX]]></title>
            <link>https://sarahnmachi.medium.com/patch-does-not-create-records-on-sharepoint-online-dd6cf27f6766?source=rss-619c0bf9d288------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd6cf27f6766</guid>
            <category><![CDATA[office-365]]></category>
            <category><![CDATA[sharepoint]]></category>
            <category><![CDATA[power-automate]]></category>
            <category><![CDATA[powerapps]]></category>
            <category><![CDATA[microsoft-365]]></category>
            <dc:creator><![CDATA[Sarah Nmachi]]></dc:creator>
            <pubDate>Mon, 25 Apr 2022 16:57:01 GMT</pubDate>
            <atom:updated>2022-04-25T19:03:04.875Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>“</em>I opened your test version and had a good look and matched my SharePoint list titles and formatting and went and looked at the patch code on the confirm button and it all looks the same but I still cannot patch. The button is set to edit…. My code matches yours — I just don’t know what is going wrong?</blockquote><blockquote>Any suggestions?”</blockquote><p>Above is an example of an issue received from a power apps user. It is frustrating knowing you did everything right, however things do not work the way you want.</p><p>As seen below there is no error shown, however, whenever a user clicks on the button, patch does not create the record on SharePoint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FRKjvefZ8JqUIPSi.png" /></figure><p>One of the reasons from my experience is that the SharePoint column internal name/Field is different from the SharePoint column name.</p><p>What is the difference between the SharePoint Field and SharePoint Column Name?</p><p>Every Column in SharePoint has two(2) names, the internal name assigned by SharePoint when you created the column and the name assigned by you.</p><p>Unfortunately, at the time of writing this article, there is no way to change the internal name.</p><p>How do I find the Field name/internal name?</p><p>To find the Field name</p><ul><li>Go to List Settings</li><li>Click on the affected Column</li><li>The field name is found at the end of the URL</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fzY90Tc1Rxs274TOUSLe1g.png" /></figure><p>As seen in above image Field is “Reserved_x0020_By1” while the column name is “Reserved By”.</p><p>Most times at the creation of a column, if there is a lot of space, SharePoint randomly fills this space with special characters as seen above.</p><p>To fix this issue, you need to replace the column name in your power apps patch code with the SharePoint Field/internal name as seen below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PwcZZrm0WKaZLp_T.png" /></figure><p>In conclusion, when creating a column, avoid the use of complicated names to avoid errors like this. The column name can always be changed later to anything complicated while the internal name cannot.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd6cf27f6766" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to migrate Distribution Groups from Exchange on-premises to Exchange Online]]></title>
            <link>https://sarahnmachi.medium.com/how-to-migrate-distribution-groups-from-exchange-on-premises-to-exchange-online-95d5cd82901d?source=rss-619c0bf9d288------2</link>
            <guid isPermaLink="false">https://medium.com/p/95d5cd82901d</guid>
            <category><![CDATA[exchange]]></category>
            <category><![CDATA[it-admin]]></category>
            <category><![CDATA[office-365]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[active-directory]]></category>
            <dc:creator><![CDATA[Sarah Nmachi]]></dc:creator>
            <pubDate>Fri, 17 Jul 2020 16:28:45 GMT</pubDate>
            <atom:updated>2021-04-06T08:34:13.853Z</atom:updated>
            <content:encoded><![CDATA[<p>The suggested method to migrate distribution groups from the exchange on-premises to exchange online is to remove the object from on-premises and recreate it in exchange online.</p><p>This article is about using PowerShell to remove the distribution group in bulk and creating the same group in exchange online.</p><p>Just as with any script, you should test carefully and make edits necessary to suit your deployment.</p><p>Before making any changes, I prefer to export all distribution groups with all properties and save as a backup using the below cmdlet.</p><p>Get-DistributionGroup -ResultSize Unlimited |Format-List &gt; C:\Users\sarah\Desktop\backup.csv</p><p><strong>Step 1</strong></p><p><strong>Export the on-prem Distribution Groups with all the attributes to .csv</strong></p><p>#Get distribution list</p><p>Get-distributiongroup -ResultSize Unlimited |Select Name, Primarysmtpaddress|Export-csv C:\Users\Sarah\Desktop\list.csv</p><p>#Get managedby:</p><p>The ManagedBy parameter specifies an owner for the group</p><p>Get-distributiongroup -ResultSize Unlimited | Select-object Name, Primarysmtpaddress ,@{label=”ManagedBy”;expression={[string]($_.managedby | foreach {$_.tostring().split(“/”)[-1]})}} |Export-csv C:\Users\Sarah\Desktop\managedBy.csv</p><p>#Get members</p><p>To export the members, I suggest you get the PowerShell script written by Tom Menezes made available in this <a href="https://pastebin.com/kiXYMZGq">link</a>. Copy the text from the link below to notepad then save it as a .ps1 file.</p><p>To gather information on your distribution lists, run the following script from the Microsoft Exchange management console on your exchange on-premise. Usage is C:\Users\sarah\Desktop\GetMembers.ps1 and then select option 2 to export to a CSV file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*83KctTmPVcVfV5mjRb6ylw.jpeg" /></figure><p>#Get other properties</p><p>Get-distributiongroup -ResultSize Unlimited | select name, Primarysmtpaddress,RequireSenderAuthenticationEnabled, MemberJoinRestriction, MemberDepartRestriction |Export-csv C:\Users\Sarah\Desktop\properties.csv</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ujNtTaFn4VpZ9_SOZJZmKA.jpeg" /></figure><p><strong>Step 2</strong></p><p><strong>Moved the DGs from sync OU to an Unsync OU to ensure the Synced DGs no longer show in office 365.</strong></p><p>In my case, I moved the groups to the lost and found OU and force a sync. This step can be skipped if your distribution group is only visible on-premises.</p><p>#Move to lost and found OU</p><p>$TargetOU = “CN=LostAndFound,DC=sarahdomain,DC=local”</p><p>$Users = Import-Csv “ C:\Users\Sarah\Desktop\list.csv”</p><p>$Guids = ForEach ($User In $Users){ (Get-adGroup -Identity $User.Name).ObjectGUID }</p><p>Foreach($guid in $Guids ){Move-ADObject -Identity $guid.Guid -TargetPath $TargetOU}</p><p><strong>Step 3</strong></p><p><strong>Import the DGs to Exchange Online.</strong></p><p>#Connect to Exchange Online</p><p>Set-ExecutionPolicy RemoteSigned</p><p>Install-Module -Name ExchangeOnlineManagement</p><p>Connect-ExchangeOnline</p><p>#Create the distribution groups in exchange online</p><p>Import-CSV “ C:\Users\Sarah\Desktop\list.csv “ | foreach{</p><p>New-DistributionGroup -Name $_.Name -PrimarySmtpAddress $_. PrimarySmtpAddress -Type “Distribution” }</p><p>#Add members</p><p>Import-CSV “C:\Users\Sarah\Desktop\Members.csv” | foreach{Add-DistributionGroupMember -Identity $_.”Distribution Group Primary SMTP address” -Member $_.”Primary Smtp Address”}</p><p>#Add owners</p><p>Import-CSV “ C:\Users\Sarah\Desktop\managedBy.csv “| foreach{Set-DistributionGroup -Identity $_.PrimarySMTPAddress -ManagedBy $_.Managedby}</p><p>#Add other properties imported from the exchange on-premises.</p><p>Import-CSV “ C:\Users\Sarah\Desktop\properties.csv “| foreach{Set-DistributionGroup -Identity $_.PrimarySmtpAddress -RequireSenderAuthenticationEnabled $($_.RequireSenderAuthenticationEnabled -eq ‘true’) -MemberJoinRestriction $_.MemberJoinRestriction -MemberDepartRestriction $_.MemberDepartRestriction}</p><p>Now you have your on-premises Distribution groups migrated to Exchange Online with the same properties.</p><p>I hope this was informative and thank you for reading. If you have any questions please leave a comment below.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95d5cd82901d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>