<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Wai Liu</title>
    <description>The latest articles on Forem by Wai Liu (@diskdrive).</description>
    <link>https://forem.com/diskdrive</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F726887%2F8f8c8eb4-2869-46d3-a966-31c85f9aa537.png</url>
      <title>Forem: Wai Liu</title>
      <link>https://forem.com/diskdrive</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/diskdrive"/>
    <language>en</language>
    <item>
      <title>Deleting all blobs in an Azure Storage / Data Lake container quickly</title>
      <dc:creator>Wai Liu</dc:creator>
      <pubDate>Wed, 20 Sep 2023 05:36:25 +0000</pubDate>
      <link>https://forem.com/diskdrive/deleting-all-blobs-in-an-azure-storage-data-lake-container-quickly-eic</link>
      <guid>https://forem.com/diskdrive/deleting-all-blobs-in-an-azure-storage-data-lake-container-quickly-eic</guid>
      <description>&lt;p&gt;The Azure CLI contains a delete-batch command to delete multiple blobs at once.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;az storage blob delete-batch --account-key &amp;lt;storage_account_key&amp;gt; --account-name &amp;lt;storage_account_name&amp;gt; --source &amp;lt;container_name&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This article explains this in &lt;a href="https://ppolyzos.com/2020/07/30/easily-delete-all-files-in-an-azure-storage-container/"&gt;detail&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;However, this command is sloooooow. If you have 100k+ records, this could take hours.&lt;/p&gt;

&lt;p&gt;Another way to do it is programmatically. Here is an Azure function that can be deployed to delete all your blobs much faster.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public static class DeleteAllFilesInContainer
    {
        [FunctionName("DeleteAllFilesInContainer")]
        public static async Task&amp;lt;IActionResult&amp;gt; Run(
            [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
            ILogger log)
        {

            string containerName = "mycontainer";
            string directoryPath = $"mydirectory";
            var client = GetDataLakeServiceClient("mydatalakeaccount", "&amp;lt;insert key&amp;gt;");
            var fileSystemClient = client.GetFileSystemClient(containerName);

            IAsyncEnumerator&amp;lt;PathItem&amp;gt; enumerator =
                fileSystemClient.GetPathsAsync("message").GetAsyncEnumerator();

            await enumerator.MoveNextAsync();

            PathItem item = enumerator.Current;

            var lstOfTasks = new List&amp;lt;Task&amp;gt;();
            int i = 0;

            while (item != null)
            {

                if (!await enumerator.MoveNextAsync())
                {
                    break;
                }

                item = enumerator.Current;
                lstOfTasks.Add(DeleteFile(item.Name, fileSystemClient));
                i++;
            }

            await Task.WhenAll(lstOfTasks.ToArray());

            string responseMessage = $"You deleted {i} files";
            return new OkObjectResult(responseMessage);
        }

        public static DataLakeServiceClient GetDataLakeServiceClient(string accountName, string accountKey)
        {
            StorageSharedKeyCredential sharedKeyCredential =
                new StorageSharedKeyCredential(accountName, accountKey);

            string dfsUri = $"https://{accountName}.dfs.core.windows.net";

            DataLakeServiceClient dataLakeServiceClient = new DataLakeServiceClient(
                new Uri(dfsUri),
                sharedKeyCredential);

            return dataLakeServiceClient;
        }


        public async static Task DeleteFile(
            string fileName, DataLakeFileSystemClient fileSystemClient)
        {
            await fileSystemClient.GetFileClient(fileName).DeleteAsync();
        }


    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important bits are below.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;var lstOfTasks = new List&amp;lt;Task&amp;gt;();&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Create a list of Tasks.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;lstOfTasks.Add(DeleteFile(item.Name, fileSystemClient));&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For each blob, create an asynchronous task to delete it&lt;/p&gt;

&lt;p&gt;&lt;code&gt;await Task.WhenAll(lstOfTasks.ToArray());&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Wait until all the tasks to delete each of their files are finished.&lt;/p&gt;

&lt;p&gt;This method will make an make a request for each file to be deleted and fire these requests all at the same time.&lt;/p&gt;

&lt;p&gt;Method can be adjusted to delete only some blobs based on some sort of filter as needed.&lt;/p&gt;

&lt;p&gt;In a container with 130k blobs it took less than 4 minutes to delete everything.&lt;/p&gt;

</description>
      <category>azure</category>
      <category>azurefunctions</category>
      <category>azurestorageaccount</category>
      <category>csharp</category>
    </item>
    <item>
      <title>Deploying Angular apps to Azure Static Web apps</title>
      <dc:creator>Wai Liu</dc:creator>
      <pubDate>Fri, 26 May 2023 04:53:13 +0000</pubDate>
      <link>https://forem.com/diskdrive/deploying-spa-apps-to-azure-static-web-apps-dmi</link>
      <guid>https://forem.com/diskdrive/deploying-spa-apps-to-azure-static-web-apps-dmi</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Azure Static Web Apps is a perfect hosting option for SPA frameworks like Angular or React.&lt;/p&gt;

&lt;p&gt;The best thing is it's going to be free (or at least dirt cheap if you have a highly trafficked site) but not only that it contains a whole host of goodies out of the box. This includes the following&lt;/p&gt;

&lt;h3&gt;
  
  
  Content Delivery Network
&lt;/h3&gt;

&lt;p&gt;Your files are served from edge servers so wherever your users are, there should be minimal latency.&lt;/p&gt;

&lt;h3&gt;
  
  
  CI/CD Pipelines
&lt;/h3&gt;

&lt;p&gt;As development teams try to increase their velocity, one critical prerequisite is the ability to deploy quickly, automatically and consistently and to do that, you need to build CI/CD pipelines. This can sometimes be an afterthought, but with azure Static Web apps, this is the default. You have to specify your Github / DevOps repo as part of spinning one up and it automatically creates a Github Action / Pipeline for you.&lt;/p&gt;

&lt;h3&gt;
  
  
  Multi deployment environments
&lt;/h3&gt;

&lt;p&gt;The "static" in Static Web Apps implies files (eg. HTML, JS or CSS or other asset files) that do not change - at least not without a deployment. This means it's really easy to create environments for different versions of them. This is built out of the box - you can easily spin up a new environment to test the changes of a PR or have dedicated test or UAT environments. It's all very flexible and very easy to implement.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demonstration
&lt;/h2&gt;

&lt;p&gt;Rather than explaining how it works in detail, it's much easier for me to just show you in the attached video. In this video, I'll be showcasing the features of Azure Static Web App to deploy a sample Angular solution. Feel free to like or subscribe!&lt;/p&gt;

&lt;p&gt;Finally, the codebase can be viewed &lt;a href="https://www.youtube.com/redirect?event=video_description&amp;amp;redir_token=QUFFLUhqbnM2ZmdrM3YzTDhBTFNxV05Wck9Yc2RuVmVTUXxBQ3Jtc0trSzVVaU5TWW5adFRfTmJrZVlRS3Z5UmtCalhBak5EQ0MwRktKMnhwd3A3OTZHSy1TZThkME82SzNwRTRTRUJlb21ONjRNLTBzdnVRM2EwUFhQR2YwYjJwTk4wdFJSWmprYXkzMGIxQ0dWNF9lQklnNA&amp;amp;q=https%3A%2F%2Fgithub.com%2Fwaiholiu%2FStaticWebAppDemo&amp;amp;v=8X-PVOKfkMw"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/8X-PVOKfkMw"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>azure</category>
      <category>staticwebapps</category>
      <category>angular</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Retrieving deleted passwords in Chrome</title>
      <dc:creator>Wai Liu</dc:creator>
      <pubDate>Sun, 24 Jul 2022 23:19:00 +0000</pubDate>
      <link>https://forem.com/diskdrive/retrieving-deleted-passwords-in-chrome-28kd</link>
      <guid>https://forem.com/diskdrive/retrieving-deleted-passwords-in-chrome-28kd</guid>
      <description>&lt;h1&gt;
  
  
  Scenario
&lt;/h1&gt;

&lt;p&gt;I accidentally cleared my browsing data including Passwords in Chrome whilst synced to my chrome account&lt;/p&gt;

&lt;p&gt;By clicking on Clear Data here&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fmMVskxC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/61yqwpbyqy8cy84onucs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fmMVskxC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/61yqwpbyqy8cy84onucs.png" alt="Image description" width="510" height="472"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is how you know if you're syncing to your google account&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--64AuO0r2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qkpyecjpdpnvzkde67tj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--64AuO0r2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qkpyecjpdpnvzkde67tj.png" alt="Image description" width="312" height="465"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When this happens, it'll delete the passwords from the google cloud servers as well as all your devices.&lt;/p&gt;

&lt;h1&gt;
  
  
  How to fix
&lt;/h1&gt;

&lt;p&gt;First, this is a bad situation. The only way you can retrieve the passwords is if you have a second device that is also synced to google. This could be another laptop, a mobile etc. but whatever it is - immediately, turn off the wifi on it. &lt;/p&gt;

&lt;p&gt;This is because as soon as Chrome has a chance to go on the Internet, it'll sync and delete all the passwords on there too. For me, I had a second laptop and I drove a couple of blocks from my house to make sure it didn't accidentally pick up the wifi whilst I was unlocking it.&lt;/p&gt;

&lt;h1&gt;
  
  
  Exporting your password
&lt;/h1&gt;

&lt;p&gt;After you have deprived the device of network access, let's immediately export the passwords so whatever happens, we know we still have them.&lt;/p&gt;

&lt;p&gt;You can do that by going to the password screen&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jjtRSUDN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h18gumsj4bmuc5txmgnj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jjtRSUDN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h18gumsj4bmuc5txmgnj.png" alt="Image description" width="289" height="215"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And clicking on Export password under the ellipsis in Saved Passwords&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gqHiFGQe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gemrmpd02r4te617vg68.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gqHiFGQe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gemrmpd02r4te617vg68.png" alt="Image description" width="795" height="106"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note this will create a cleartext CSV file with all your passwords. This is just for backup purposes - I would delete this once everything is running again.&lt;/p&gt;

&lt;h1&gt;
  
  
  Turn off the sync
&lt;/h1&gt;

&lt;p&gt;After I deprived the device of network access, I turned off the sync on it.&lt;/p&gt;

&lt;p&gt;Go to Chrome Settings, You and Google and click Turn Off.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--T65g7sFs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mb1fw1iylr84cs2opt91.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--T65g7sFs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mb1fw1iylr84cs2opt91.png" alt="Image description" width="880" height="103"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Very important here is to make sure to leave the Clear bookmarks, history, passwords checkbox unchecked.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JBbkvs7o--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ngaqfldjsgl4lbe1a9nm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JBbkvs7o--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ngaqfldjsgl4lbe1a9nm.png" alt="Image description" width="768" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Turn the sync back on
&lt;/h1&gt;

&lt;p&gt;Once you've logged out, turn your wifi back on.&lt;/p&gt;

&lt;p&gt;You should notice that your browser profile no longer is logged in but it still has your passwords stored against it.&lt;/p&gt;

&lt;p&gt;If you log back in and turn on sync, it should reinstate your password back to your Google account.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--E8d0sPMh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i5e5ceswwmyzvkx3f9v7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--E8d0sPMh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i5e5ceswwmyzvkx3f9v7.png" alt="Image description" width="276" height="315"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you check your other devices you should be able to see that the passwords have been reinstated on the cloud account.&lt;/p&gt;

</description>
      <category>browser</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Setting up a Power BI deployment pipeline with environment-specific data sources</title>
      <dc:creator>Wai Liu</dc:creator>
      <pubDate>Wed, 25 May 2022 04:50:06 +0000</pubDate>
      <link>https://forem.com/diskdrive/setting-up-a-power-bi-deployment-pipeline-with-environment-specific-data-sources-4lfm</link>
      <guid>https://forem.com/diskdrive/setting-up-a-power-bi-deployment-pipeline-with-environment-specific-data-sources-4lfm</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;Power BI Deployment Pipelines allow you to implement Application Lifecycle Management (ALM) for your Power BI Service workspaces. Today I'll show you how to use one-click deployment to elevate changes from dev through to production.&lt;/p&gt;

&lt;h1&gt;
  
  
  Prerequisites
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;You must have Power BI Premium license to use Deployment Pipelines. You should be able to get a trial for 60 days.&lt;/li&gt;
&lt;li&gt;You'll also need Power BI Desktop installed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Creating Premium Workspaces
&lt;/h1&gt;

&lt;p&gt;The first thing to do is to create premium workspaces - you'll need one for each environment.&lt;/p&gt;

&lt;p&gt;At app.powerbi.com, go to Workspaces / Create Workspaces&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--l6OWI7Ug--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yrc9ygtbud880phkgt7x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--l6OWI7Ug--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yrc9ygtbud880phkgt7x.png" alt="Image description" width="880" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Make sure you pick Premium per user as license mode.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ovqSK6S_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y2hjrhngubuuegol80p6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ovqSK6S_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y2hjrhngubuuegol80p6.png" alt="Image description" width="204" height="162"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In our case, we'll create two workspaces - Dev and Test.&lt;/p&gt;

&lt;h1&gt;
  
  
  Creating pipeline
&lt;/h1&gt;

&lt;p&gt;Once the workspaces are created, go and create a pipeline.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RXerJrjg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qgbd3kmfbwp7wd5x3z6t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RXerJrjg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qgbd3kmfbwp7wd5x3z6t.png" alt="Image description" width="522" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Assign your dev workspaces to the Development stage&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--80BnFKjA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r235mj1oe2l1hoqjcrul.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--80BnFKjA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r235mj1oe2l1hoqjcrul.png" alt="Image description" width="832" height="544"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Your Pipeline View
&lt;/h1&gt;

&lt;p&gt;This is your pipeline view - you have three stages - Development, Test and Production. Each stage is attributed to one workspace. In this example, we'll demonstrate going from Dev to Test but going to Production should be exactly the same process. &lt;/p&gt;

&lt;p&gt;The last thing to do in this view is to assign the Test workspace to the Test stage&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--l_Ubrneh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7tedz2fksxhkllxedvnw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--l_Ubrneh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7tedz2fksxhkllxedvnw.png" alt="Image description" width="880" height="339"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Creating a report in PowerBI Desktop
&lt;/h1&gt;

&lt;p&gt;We want to connect a report in PowerBI Desktop to demonstrate how the pipelines work. A common difference between each of your power bi environments is going to be the data source. Your dev environment should connect to the dev database, your test environment to test database and so on.&lt;/p&gt;

&lt;p&gt;How to use Power BI Desktop is outside the scope of this article but the quickest way is to open up the application and select Get Data&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NXKAss_J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cxyyxf2rfl1ma3nphwr5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NXKAss_J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cxyyxf2rfl1ma3nphwr5.png" alt="Image description" width="298" height="332"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Any data source is fine but for my case, I'd like to create visualisations for a Power App so I'm going to select Dataverse as the data source. It'll ask you to sign in using your Azure AD account and select the Power App environment.&lt;/p&gt;

&lt;p&gt;In this report, I've similarly grabbed all the data in the "accounts" table.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--shmv-K6z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rx2lqz4bg2kjy6kv761t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--shmv-K6z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rx2lqz4bg2kjy6kv761t.png" alt="Image description" width="596" height="332"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Adding a parameter
&lt;/h1&gt;

&lt;p&gt;I want to add a parameter for the data source because that is going to be customised for each stage. If you go to Transform data, on the ribbon, there should be a New Parameter button&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4wgGc63q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jl0byzsfwms4cppzbdt1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4wgGc63q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jl0byzsfwms4cppzbdt1.png" alt="Image description" width="444" height="208"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create the parameter by giving it a name. &lt;/p&gt;

&lt;p&gt;Select "List of Values" under Suggested Values and put in the URLs of all the environments that you would like to deploy to and select the dev URL as the environment you'd like to deploy to.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--evX53dg3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wekpl15196p3qbrn5lg0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--evX53dg3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wekpl15196p3qbrn5lg0.png" alt="Image description" width="581" height="637"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Using the parameter in the Data Model
&lt;/h1&gt;

&lt;p&gt;Instead of the report pointing to the Dev as the data source, we want it to point to the current parameter value. Therefore, for each table under the Source applied step, change the URL to be #"DataSource". &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--J3-Vli0g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ttsurmiwbvywiavg0iqa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--J3-Vli0g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ttsurmiwbvywiavg0iqa.png" alt="Image description" width="880" height="129"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Creating and publishing a report
&lt;/h1&gt;

&lt;p&gt;We'll now create a report to demonstrate the data being in different environments. For this example, I have created a simple report that simply counts the number of accounts in different statuses. These should different which will allow me to verify it's getting data from different environments.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xYeQp5WS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iwcjqzlv3njmlnrn0tta.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xYeQp5WS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iwcjqzlv3njmlnrn0tta.png" alt="Image description" width="380" height="212"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you have created your report, click the Publish button on the ribbon and select the Dev workspace.&lt;/p&gt;

&lt;h1&gt;
  
  
  Deployed to Dev
&lt;/h1&gt;

&lt;p&gt;You've successfully published your report onto the Dev Workspace inside your Power BI Service. Go to the deployment pipeline and check that inside the dev environment, you should see 1 data set and 1 report deployed. If you go to the report, you should be able to see the report in Power BI Service.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--g4bKJqMm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/63cbpkos9davg6gp4shj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--g4bKJqMm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/63cbpkos9davg6gp4shj.png" alt="Image description" width="526" height="224"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Pointing the parameter variable to Test
&lt;/h1&gt;

&lt;p&gt;We've successfully deployed to Dev, we now want to deploy to Test - we want to use the same artefacts but we want to change the data source so it's pointing to the Test Database.&lt;/p&gt;

&lt;p&gt;The first thing we should do is Deploy to Test.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JL9suJfR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xkpg707b9h23fzgynw6p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JL9suJfR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xkpg707b9h23fzgynw6p.png" alt="Image description" width="520" height="246"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the report is deployed to Test, we should set up a parameter rule. Click on the lightning settings icon for Test and select the Dataset you've just deployed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--o09c-yEP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nnq92w20fzxih0l69q02.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--o09c-yEP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nnq92w20fzxih0l69q02.png" alt="Image description" width="880" height="490"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Set up a parameter rule and point it to Test URL&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--X3_Opr1G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k4zgjohq8mmn00q3lp8v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--X3_Opr1G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k4zgjohq8mmn00q3lp8v.png" alt="Image description" width="622" height="217"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Deploy again. Once completed, if you go to the Test workspace open the report, it should show data in Test.&lt;/p&gt;

&lt;h1&gt;
  
  
  Extra tips
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Verifying the parameters
&lt;/h2&gt;

&lt;p&gt;If you want to double check whether the parameters have been set correctly for each workspace, go to the Dataset settings and you can check under Parameters what the value is.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting the connection
&lt;/h2&gt;

&lt;p&gt;Also, if you're having connection issues, you can also go to the Dataset settings, under Data source credentials, either log in or check "Report viewers can only access this data source with their own Power BI identifies". I generally tick this to ensure only the data the user has access to is in the report.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ANt6PjWG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9onia7b8wmy8tva7pnn1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ANt6PjWG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9onia7b8wmy8tva7pnn1.png" alt="Image description" width="880" height="553"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>powerbi</category>
      <category>dataverse</category>
    </item>
    <item>
      <title>Moving your Azure subscription to another tenant</title>
      <dc:creator>Wai Liu</dc:creator>
      <pubDate>Fri, 29 Apr 2022 01:51:31 +0000</pubDate>
      <link>https://forem.com/diskdrive/moving-your-student-azure-subscription-to-another-tenant-ck</link>
      <guid>https://forem.com/diskdrive/moving-your-student-azure-subscription-to-another-tenant-ck</guid>
      <description>&lt;h1&gt;
  
  
  Scenario
&lt;/h1&gt;

&lt;p&gt;I have an Azure subscription attached to my university email which I mainly use just as a sandpit to try new things out on. Microsoft offers a $100 &lt;a href="https://azure.microsoft.com/en-au/free/students/"&gt;credit&lt;/a&gt; if you have an email from an eligible educational institution. These are handy because you have a year instead of 30 days to use it.&lt;/p&gt;

&lt;p&gt;Unfortunately, these student subscriptions are attached to your university Azure AD tenant which sensibly - many unis are not going to give you any access to do much on.&lt;/p&gt;

&lt;p&gt;That means I couldn't try things which required say creating app registrations or turning on P1 or P2 licenses.&lt;/p&gt;

&lt;p&gt;This article will explain how to move this subscription over to your own tenant where you'll have full control of Azure AD. You'll still be able to have your $100 credit too and you'll still be able to access the subscription using your university credentials.&lt;/p&gt;

&lt;h1&gt;
  
  
  Prerequisites
&lt;/h1&gt;

&lt;p&gt;You'll need a subscription with Owner access and you'll need a tenant you want to move this subscription to. There's various ways to do this - the easiest is to just create a new Azure &lt;a href="https://azure.microsoft.com/en-us/free/"&gt;free account&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Adding your uni account as a guest on destination tenant
&lt;/h1&gt;

&lt;p&gt;Your university account needs to be a user in both tenants, so go to Azure AD and invite them in as a guest user. Your university mailbox will get an email where you'll need to accept the invite.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ytliUZNG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1pi06xqer8c9jqfdljy2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ytliUZNG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1pi06xqer8c9jqfdljy2.png" alt="Add guest user" width="523" height="141"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You should also grant your university account global admin access too.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jplm6bRf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ah3xsjg2iz2zdds8435f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jplm6bRf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ah3xsjg2iz2zdds8435f.png" alt="Global admin access" width="800" height="202"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Change directory of subscription
&lt;/h1&gt;

&lt;p&gt;Once access is granted, your university mailbox is now a user in both tenants. It's time to go to the subscription and click on Change Directory and select the new tenant.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VScX4uEC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1rzwa6l57vfctorsf02i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VScX4uEC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1rzwa6l57vfctorsf02i.png" alt="Change Directory" width="762" height="144"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you click 'Change', be aware that it may take some time to cascade.&lt;/p&gt;

&lt;h1&gt;
  
  
  Verify it all works
&lt;/h1&gt;

&lt;p&gt;After a little while, you're going to find the subscription will have disappeared. If you go and Switch Directory to your new tenant and you should see it.&lt;/p&gt;

&lt;p&gt;On the Subscription overview page, you should see the Directory is now your new tenant.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--usD9eQX1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qztabffnxh8fo4qikh3b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--usD9eQX1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qztabffnxh8fo4qikh3b.png" alt="Directory" width="266" height="184"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Go ahead and try to create a new resource. You should be able to indicating you still have your $100 credit.&lt;/p&gt;

&lt;h1&gt;
  
  
  Further reading
&lt;/h1&gt;

&lt;p&gt;Note, there are some caveats which may be problematic if you were moving anything more than a sandpit subscription. For example, role assignments aren't migrated across and I've encountered problems with key vaults.&lt;/p&gt;

&lt;p&gt;See the official documentation for more information about how Change Directory works &lt;a href="https://docs.microsoft.com/en-us/azure/role-based-access-control/transfer-subscription"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Further note - I'm not sure what'll happen but I would suggest not using the Transfer Ownership option. I haven't tried it but if you transfer ownership out of your university mailbox, it might alter the subscription type so you no longer get that $100 credit.&lt;/p&gt;

</description>
      <category>azure</category>
      <category>azuread</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Accessing environment variables in your custom workflow activity or plugin</title>
      <dc:creator>Wai Liu</dc:creator>
      <pubDate>Fri, 25 Mar 2022 06:01:02 +0000</pubDate>
      <link>https://forem.com/diskdrive/accessing-environment-variables-in-your-custom-workflow-activity-or-plugin-2j45</link>
      <guid>https://forem.com/diskdrive/accessing-environment-variables-in-your-custom-workflow-activity-or-plugin-2j45</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;Environment variables are a great way to store global variables that differ in each of your environment. Some common use cases are storing the AppID so it can be referenced in your flows or maybe a Sharepoint site url if you are storing data there. They’re stored on the Dataverse under the EnvironmentVariableDefinition and EnvironmentVariableValue table.&lt;/p&gt;

&lt;p&gt;Whilst they’re built into Power Automate and you can access them relatively easy, if you need to reference them in a traditional plugin or custom workflow activity, you’ll need use FetchXML to retrieve them.&lt;/p&gt;

&lt;h1&gt;
  
  
  Code Snippet
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;protected&lt;/span&gt; &lt;span class="k"&gt;override&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;CodeActivityContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="k"&gt;try&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;IOrganizationServiceFactory&lt;/span&gt; &lt;span class="n"&gt;serviceFactory&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;GetExtension&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;IOrganizationServiceFactory&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;();&lt;/span&gt;
        &lt;span class="n"&gt;IWorkflowContext&lt;/span&gt; &lt;span class="n"&gt;workflowContext&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;GetExtension&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;IWorkflowContext&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;();&lt;/span&gt;
        &lt;span class="c1"&gt;// Use the context service to create an instance of IOrganizationService.&lt;/span&gt;
        &lt;span class="n"&gt;IOrganizationService&lt;/span&gt; &lt;span class="n"&gt;service&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;serviceFactory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;CreateOrganizationService&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;workflowContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;InitiatingUserId&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;appID&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;GetEnvironmentVariable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;service&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"appID"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Exception&lt;/span&gt; &lt;span class="n"&gt;ex&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;InvalidPluginExecutionException&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ex&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ToString&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="nf"&gt;GetEnvironmentVariable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;IOrganizationService&lt;/span&gt; &lt;span class="n"&gt;service&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;envVariableName&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;fetchXml&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Empty&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;EntityCollection&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;envVariableValue&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Empty&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="n"&gt;fetchXml&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;String&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;@"&amp;lt;fetch version=""1.0"" output-format=""xml-platform"" mapping=""logical"" distinct=""false""&amp;gt;
            &amp;lt;entity name=""environmentvariablevalue""&amp;gt;
            &amp;lt;attribute name=""environmentvariablevalueid"" /&amp;gt;
            &amp;lt;attribute name=""value"" /&amp;gt;
            &amp;lt;link-entity name=""environmentvariabledefinition"" from=""environmentvariabledefinitionid"" to=""environmentvariabledefinitionid"" link-type=""inner""&amp;gt;
                &amp;lt;attribute name=""displayname"" /&amp;gt;
                &amp;lt;filter type=""and""&amp;gt;
                &amp;lt;condition attribute=""displayname"" operator=""eq"" value=""{0}"" /&amp;gt;
                &amp;lt;/filter&amp;gt;
            &amp;lt;/link-entity&amp;gt;
            &amp;lt;/entity&amp;gt;
        &amp;lt;/fetch&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;envVariableName&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;service&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;RetrieveMultiple&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;FetchExpression&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fetchXml&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="p"&gt;!=&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt; &lt;span class="p"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Entities&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Count&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;envVariableValue&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Entities&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;GetAttributeValue&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="s"&gt;"value"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;envVariableValue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Explanation
&lt;/h1&gt;

&lt;p&gt;So under Execute method, we have the standard boilerplate code to get the classes to be able to access the DataVerse.&lt;/p&gt;

&lt;p&gt;Inside the GetEnvironmentVariable method is really where all the action is. It takes a parameter called envVariableName and then we make a call using FetchXML to retrieve the Environment Value with that name.&lt;/p&gt;

</description>
      <category>powerplatform</category>
      <category>dynamics365</category>
      <category>csharp</category>
      <category>powerapps</category>
    </item>
    <item>
      <title>Trigger an instant flow from a model-driven app</title>
      <dc:creator>Wai Liu</dc:creator>
      <pubDate>Sat, 12 Mar 2022 05:37:56 +0000</pubDate>
      <link>https://forem.com/diskdrive/trigger-an-instant-flow-from-a-model-driven-app-480a</link>
      <guid>https://forem.com/diskdrive/trigger-an-instant-flow-from-a-model-driven-app-480a</guid>
      <description>&lt;p&gt;In this &lt;a href="https://dev.to/diskdrive/trigger-an-instant-flow-from-a-canvas-app-simple-example-5f1h"&gt;article&lt;/a&gt;, I demonstrated how to trigger an instant flow from a canvas app, now I will demonstrate the same but in a model driven app.&lt;/p&gt;

&lt;h1&gt;
  
  
  The Flow button
&lt;/h1&gt;

&lt;p&gt;In a model driven app, there is a Flows button on the details page that allows you to run adhoc commands on the current record. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Cg2MXlWq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t85rfh1g2g4gv05dwzu1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Cg2MXlWq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t85rfh1g2g4gv05dwzu1.png" alt="Image description" width="293" height="183"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's a little bit confusing because they use the word "Flow" but there's actually two ways to create these "flows". The first is the old fashioned way using on-demand workflows which you can do by just ticking the "As an on-demand process" in any clasic workflow.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_cjO68AW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9uk06iy4gwsi2zhta0gb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_cjO68AW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9uk06iy4gwsi2zhta0gb.png" alt="Image description" width="598" height="358"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The other method is by creating an instant flow in Power Automate and this article is will explain how.&lt;/p&gt;

&lt;h1&gt;
  
  
  Scenario
&lt;/h1&gt;

&lt;p&gt;As a simple example to demonstrate the concept, what I'd like to do is create a button to allow me to email the details of a Lead to a hard-coded email address.&lt;/p&gt;

&lt;h1&gt;
  
  
  Create the Instant Flow in a solution
&lt;/h1&gt;

&lt;p&gt;Don't click the "Create a flow" button cause that will create a personal flow. We want the flow in a solution so that we can exercise good &lt;a href="https://dev.to/diskdrive/series/15744"&gt;ALM&lt;/a&gt; practices.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tsFsaBW1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/95mlm2prna991nyjusgb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tsFsaBW1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/95mlm2prna991nyjusgb.png" alt="Image description" width="420" height="224"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Select the "When a row is selected" trigger. This is in the old Dataverse (legacy) connector. At the time of this writing, the new connector doesn't have this trigger yet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---yCXV4Ni--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j0069eh8b0zttr95oej6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---yCXV4Ni--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j0069eh8b0zttr95oej6.png" alt="Image description" width="614" height="392"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your Environment should be "Default" and under Table, select the record type. For this example, I've selected "Leads".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9ZZCJvFz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pmc3einwe58qina3khht.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9ZZCJvFz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pmc3einwe58qina3khht.png" alt="Image description" width="629" height="226"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Adding inputs
&lt;/h1&gt;

&lt;p&gt;You can feed information into the instant flow by clicking "Add an input" - here I've added a field to enter extra info about the lead.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5nyZjveK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/293xbzvdbb2vco171bmx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5nyZjveK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/293xbzvdbb2vco171bmx.png" alt="Image description" width="608" height="273"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Adding the Email action
&lt;/h1&gt;

&lt;p&gt;Select the Office 365 Outlook connector and Send an email (v2) action.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--czjTIZGu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ytfowkcl6w8rdrn4ver7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--czjTIZGu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ytfowkcl6w8rdrn4ver7.png" alt="Image description" width="605" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fill in the email as you wish.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tvElVnv3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rdjlts9dgzn5iq86qnos.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tvElVnv3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rdjlts9dgzn5iq86qnos.png" alt="Image description" width="598" height="424"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once this is done, you should save the flow and publish the solution.&lt;/p&gt;

&lt;h1&gt;
  
  
  Executing the instant flow
&lt;/h1&gt;

&lt;p&gt;To execute the flow, simply navigate to the Lead that you want. It should now appear under "Flow".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MtB1ZxUW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a8uw0e9kd9mwehohijkv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MtB1ZxUW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a8uw0e9kd9mwehohijkv.png" alt="Image description" width="274" height="293"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As we asked for extra input, it'll prompt for this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Gjwqxq2u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wxxxiwga1r64htr9rjqo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Gjwqxq2u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wxxxiwga1r64htr9rjqo.png" alt="Image description" width="591" height="496"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;Below is the email I get once the flow is executed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZIUcc81z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3m9qjrzeoljlc1eng9ou.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZIUcc81z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3m9qjrzeoljlc1eng9ou.png" alt="Image description" width="542" height="504"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Instant flows allows developers to easily use the features of Power Automate to add extra functionality to their model driven apps.&lt;/p&gt;

</description>
      <category>powerplatform</category>
      <category>powerapps</category>
      <category>powerautomate</category>
      <category>dynamics365</category>
    </item>
    <item>
      <title>Copying your http request from browser into Postman</title>
      <dc:creator>Wai Liu</dc:creator>
      <pubDate>Mon, 14 Feb 2022 11:28:45 +0000</pubDate>
      <link>https://forem.com/diskdrive/copying-your-http-request-from-browser-into-postman-m7l</link>
      <guid>https://forem.com/diskdrive/copying-your-http-request-from-browser-into-postman-m7l</guid>
      <description>&lt;p&gt;Postman is a great tool for examining API calls. &lt;/p&gt;

&lt;p&gt;Here is a quick way to get that call you want from your browser into Postman.&lt;/p&gt;

&lt;h1&gt;
  
  
  Copy it from Chrome
&lt;/h1&gt;

&lt;p&gt;Open up the Developer Tools (Ctrl-I), go to the Network tab. Find the call you want. Right click and select Copy as cURL&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frma4xogqrd9lmfweihop.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frma4xogqrd9lmfweihop.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Import it into Postman
&lt;/h1&gt;

&lt;p&gt;Inside Postman, open up File / Import (or Ctrl+O). &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9qb5wojudgcdi69g92aa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9qb5wojudgcdi69g92aa.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Paste it into the raw text tab and press Continue&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F755foc7sbb8qw2rrrjd9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F755foc7sbb8qw2rrrjd9.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once it's in Postman, you can now examine, manipulate, re-send the request as you wish.&lt;/p&gt;

</description>
      <category>api</category>
      <category>postman</category>
    </item>
    <item>
      <title>Set up automation to regularly clean up your Azure environment</title>
      <dc:creator>Wai Liu</dc:creator>
      <pubDate>Sat, 29 Jan 2022 06:28:57 +0000</pubDate>
      <link>https://forem.com/diskdrive/set-up-automation-to-regularly-clean-up-your-azure-environment-3k6c</link>
      <guid>https://forem.com/diskdrive/set-up-automation-to-regularly-clean-up-your-azure-environment-3k6c</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;I'm sure I'm not the only one this happens to but how often have you set up something Azure to maybe learn about a new feature or do a demo of some sort.&lt;/p&gt;

&lt;p&gt;So you do your work, it works but forget to delete your resource groups - then next time you check, you've just realised you've just burnt through a whole bunch of Azure compute.&lt;/p&gt;

&lt;p&gt;This article helps you avoid this by setting up Azure Automation to delete these resources up at a regular interval.&lt;/p&gt;

&lt;h1&gt;
  
  
  Word of warning
&lt;/h1&gt;

&lt;p&gt;Before we begin, this isn't something you should do on a production subscription or ereally any subscription where holds any data you don't want to lose.&lt;/p&gt;

&lt;p&gt;This is intended to be set up in a PAYG subscription that you've set up to experiment on and you'd like to keep pristine.&lt;/p&gt;

&lt;h1&gt;
  
  
  What we want to do
&lt;/h1&gt;

&lt;p&gt;The requirement is that once a day, a job will run and delete all the resource groups in the subscription beginning with "todelete".&lt;/p&gt;

&lt;p&gt;For example, this resource group and everything inside it will be deleted once the job runs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5tnkoaql--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bl273kszacizi47dccws.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5tnkoaql--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bl273kszacizi47dccws.png" alt="Image description" width="369" height="134"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This may be not exactly what you want but it should be easy to customise it once you understand what's being done.&lt;/p&gt;

&lt;h1&gt;
  
  
  Prerequisite
&lt;/h1&gt;

&lt;p&gt;You'll need an Azure subscription with contributor or higher access. We'll be using Azure Automation to accomplish this&lt;/p&gt;

&lt;h1&gt;
  
  
  Create an Automation account
&lt;/h1&gt;

&lt;p&gt;Go into the portal and create an Automation account - make sure the resource group you assign to it DOESN'T start with todelete or it'll get deleted when the job runs.&lt;/p&gt;

&lt;p&gt;Once it is created, Go to Identity, and assign Contributor access across the whole tenant. This creates a managed identity that gives it access to the whole tenant.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_2DqwV0T--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t82vf0omlncy8660zj6i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_2DqwV0T--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t82vf0omlncy8660zj6i.png" alt="Image description" width="767" height="563"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UIbcLVTE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8gpbrhe371egyjfikxs6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UIbcLVTE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8gpbrhe371egyjfikxs6.png" alt="Image description" width="880" height="343"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Create a runbook
&lt;/h1&gt;

&lt;p&gt;Now we have set up the Automation account and given it the access we want, it's time to tell the automation account what to do.&lt;/p&gt;

&lt;p&gt;Runbooks allows you to specify a script to run. You can run in a number of languages but for our purposes we should select PowerShell.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Hz9-6r_F--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r9cg0kll7lru13m2q6x0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Hz9-6r_F--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r9cg0kll7lru13m2q6x0.png" alt="Image description" width="453" height="189"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HcL-6Roo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ufhw82gjumlk7vxzdwp0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HcL-6Roo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ufhw82gjumlk7vxzdwp0.png" alt="Image description" width="442" height="393"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the runbook has finished, paste this &lt;a href="https://gist.github.com/waiholiu/d6b4707f60f3f02f9372bae9b7f39e2d"&gt;gist&lt;/a&gt; and press Publish.,&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--peDe9Kh---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/45mlqjmal790d0zqudww.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--peDe9Kh---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/45mlqjmal790d0zqudww.png" alt="Image description" width="880" height="357"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Examining the script
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://gist.github.com/waiholiu/d6b4707f60f3f02f9372bae9b7f39e2d"&gt;script&lt;/a&gt; is really simple - the first part just logs in using the managed identity of the Automation account.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;try
{
    "Logging in to Azure..."
    Connect-AzAccount -Identity
}
catch {
    Write-Error -Message $_.Exception
    throw $_.Exception
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The second part gets all resource groups starting with "todelete", pipes it to the next command which is to delete them one by one - the -force flag means there is no warning.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;get-azresourcegroup -name todelete* | remove-azresourcegroup -force
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you're a little concerned about this step, you can always run &lt;code&gt;get-azresourcegroup -name todelete*&lt;/code&gt; on its own and see what resource groups are listed - those are the ones that will be deleted.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test to see if this works.
&lt;/h2&gt;

&lt;p&gt;We've set up the automation account with the right access, we've created a runbook that has a script to delete the right resources, at this point, let's test it to see if it's all functioning. &lt;/p&gt;

&lt;p&gt;To prove that it works, create two resource groups called "todeleteRG" and "dontdeleteRG".&lt;/p&gt;

&lt;p&gt;Now start the runbook - once it finishes, the todeleteRG will be gone and the dontdeleteRG will remain.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--y8L0gDqL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/irmihumyiw9k7w2aevym.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--y8L0gDqL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/irmihumyiw9k7w2aevym.png" alt="Image description" width="574" height="286"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Set up the schedule
&lt;/h1&gt;

&lt;p&gt;Once we prove the logic works, lets set it up so that it runs overnight automatically and we do that by linking a schedule to the runbook.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HUVsdSvf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5rrxf86tb5a8jyp4n0fc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HUVsdSvf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5rrxf86tb5a8jyp4n0fc.png" alt="Image description" width="500" height="248"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_4nv8nDS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ah8tv5jzsg43ad0cc20c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_4nv8nDS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ah8tv5jzsg43ad0cc20c.png" alt="Image description" width="344" height="239"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--H006mKHO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o9e9o6yam5mzihmu1dhw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--H006mKHO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o9e9o6yam5mzihmu1dhw.png" alt="Image description" width="736" height="627"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;And that's it - every night at 3am, your Azure subscription reverts back to an original state. Now of course, there's lots of things you can do to customise this. Maybe you want to use tags to determine what needs to be deleted instead of the resource group names? Maybe you want to do weekly deletes instead of daily deletes (maybe you can even have two runbooks - one for weekly deletes and one for dailys) - all of this is possible with just a bit of tinkering.&lt;/p&gt;

&lt;p&gt;For me, every time I create anything in this subscription, all I have to do is remember to create the resource group with a "todelete" prefix and there's no need to worry it about being there in the morning.&lt;/p&gt;

</description>
      <category>azure</category>
      <category>powershell</category>
    </item>
    <item>
      <title>Field level security in the Dataverse</title>
      <dc:creator>Wai Liu</dc:creator>
      <pubDate>Mon, 03 Jan 2022 02:01:09 +0000</pubDate>
      <link>https://forem.com/diskdrive/field-level-security-in-the-dataverse-4hnk</link>
      <guid>https://forem.com/diskdrive/field-level-security-in-the-dataverse-4hnk</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;Whilst the Dataverse supports permissions at the table or row level, there may be times you need more granular security permissions on the individual field level. &lt;/p&gt;

&lt;p&gt;Dataverse supports this with Column Security Profiles. They are easy to set up and this article will provide a quick example to get you started.&lt;/p&gt;

&lt;h1&gt;
  
  
  1. In any table, create new field called PrivateValue and make sure Column Security is enabled.
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwpjps7etyprl6cvtpww3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwpjps7etyprl6cvtpww3.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbkom4niswm52xyuivrrf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbkom4niswm52xyuivrrf.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  2. Add this field to a form
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnzwuzethzvbinknxae8j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnzwuzethzvbinknxae8j.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  3. Create a new Column Security Profile
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz6gaon1plsdooc4cimaw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz6gaon1plsdooc4cimaw.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  4. Configure it so you have access to the field
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftd5mzgw76qdv2920m0qs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftd5mzgw76qdv2920m0qs.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj9g5wecij3tx3oi6bzsb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj9g5wecij3tx3oi6bzsb.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  5. Publish and test by navigating to the form
&lt;/h1&gt;

&lt;p&gt;For someone with access, it should appear like this&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcmwgnmsq4wtkyjo940hj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcmwgnmsq4wtkyjo940hj.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For someone without access, it should appear like this&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4gnzdw090i1hj6g6y6qz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4gnzdw090i1hj6g6y6qz.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  6. Resources and final comments
&lt;/h1&gt;

&lt;p&gt;Note that this isn't available for some of the system fields (for example, you can't enable field security for a Status Reason or Status field in a table).&lt;/p&gt;

&lt;p&gt;Note that in your column security profile, you can provide different levels of permissions on the field (read only, create etc).&lt;/p&gt;

&lt;p&gt;For more information see this &lt;a href="https://docs.microsoft.com/en-gb/power-platform/admin/field-level-security" rel="noopener noreferrer"&gt;link&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>powerplatform</category>
      <category>powerapps</category>
      <category>dynamics365</category>
      <category>dataverse</category>
    </item>
    <item>
      <title>Trigger an instant flow from a canvas app - simple example</title>
      <dc:creator>Wai Liu</dc:creator>
      <pubDate>Thu, 23 Dec 2021 05:27:29 +0000</pubDate>
      <link>https://forem.com/diskdrive/trigger-an-instant-flow-from-a-canvas-app-simple-example-5f1h</link>
      <guid>https://forem.com/diskdrive/trigger-an-instant-flow-from-a-canvas-app-simple-example-5f1h</guid>
      <description>&lt;h1&gt;
  
  
  1. Create a canvas app with three components
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--POLT7j9H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lqompl5zo8fmlvegrjlp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--POLT7j9H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lqompl5zo8fmlvegrjlp.png" alt="Image description" width="293" height="225"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Text input will what we send to the Instant Flow&lt;/li&gt;
&lt;li&gt;Create Task button will be the trigger&lt;/li&gt;
&lt;li&gt;LabelResult will be what is returned&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  2. Create Instant Flow
&lt;/h1&gt;

&lt;p&gt;In a solution, create a new Instant Flow&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Hpmbs4Rh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sbt64t0molb0yz8pypdm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Hpmbs4Rh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sbt64t0molb0yz8pypdm.png" alt="Image description" width="711" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Select Power Apps as the Trigger and call it "Instant Flow"&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Nt0fPI7R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xxx2kauxdz3iapg2erca.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Nt0fPI7R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xxx2kauxdz3iapg2erca.png" alt="Image description" width="548" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Edit the Instant Flow
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5A7I_wCn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/it7w0ayqf74m44td54qu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5A7I_wCn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/it7w0ayqf74m44td54qu.png" alt="Image description" width="816" height="548"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There should be 3 steps&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PowerApps&lt;/strong&gt; - That's the first step - as it's an instant step, you don't have to do anything&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Add a new row&lt;/strong&gt; - this is specific to this example and all I'm really doing is going to create a task with the subject of all the input I'm putting into the flow&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rQ9yIxLE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/50tityve9kohrvw27oqo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rQ9yIxLE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/50tityve9kohrvw27oqo.png" alt="Image description" width="778" height="261"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(Optional) to create inputs go to the Dynamic Content tab and click Ask in PowerApps&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rzkhW7f9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/alsx49h0ffo11r7379tu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rzkhW7f9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/alsx49h0ffo11r7379tu.png" alt="Image description" width="491" height="627"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Respond to a Powerapp or Flow&lt;/strong&gt; - this step returns an output back to the canvas app. For our experience we'll just put a success message.&lt;/p&gt;

&lt;h1&gt;
  
  
  4. Hook up the Canvas app to use the Instant Flow
&lt;/h1&gt;

&lt;p&gt;Select your button, click on Action at the top, then Power Automate and select the Flow you want&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TFO5f8CA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4oi6uw620bud9il4qj7a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TFO5f8CA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4oi6uw620bud9il4qj7a.png" alt="Image description" width="844" height="97"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3RUN0XHW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aczdk9p2cvjygox763ck.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3RUN0XHW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aczdk9p2cvjygox763ck.png" alt="Image description" width="880" height="578"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then Edit the formula so it is  &lt;strong&gt;Set(Var1, InstantFlow.Run(User().Email, TextInput1.Text, "extra"))&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Breaking down the formula
&lt;/h2&gt;

&lt;p&gt;InstantFlow.Run will trigger the flow - it asks for 3 variables so I've put them in there.&lt;br&gt;
Set is setting a variable with the variable being the first parameter and the second being the value of the variable. So here you're saying set Var1 to be the output of the InstantFlow.&lt;/p&gt;

&lt;h1&gt;
  
  
  Set the LabelResult
&lt;/h1&gt;

&lt;p&gt;Lastly you want the LabelResult to display the returning message from the flow so click on it and put in Var1.result as the text message&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ndmCvpen--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ixcom9g9jczqx7veyspb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ndmCvpen--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ixcom9g9jczqx7veyspb.png" alt="Image description" width="413" height="564"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>powerplatform</category>
      <category>powerautomate</category>
      <category>powerapps</category>
      <category>canvasapps</category>
    </item>
    <item>
      <title>Auto-incrementing your Power Platform solution version in your DevOps Pipeline</title>
      <dc:creator>Wai Liu</dc:creator>
      <pubDate>Thu, 09 Dec 2021 12:11:10 +0000</pubDate>
      <link>https://forem.com/diskdrive/auto-incrementing-your-power-platform-solution-version-in-your-devops-pipeline-46lo</link>
      <guid>https://forem.com/diskdrive/auto-incrementing-your-power-platform-solution-version-in-your-devops-pipeline-46lo</guid>
      <description>&lt;p&gt;Just a quick enhancement to this &lt;a href="https://dev.to/diskdrive/using-devops-to-export-a-power-platform-solution-into-source-control-56hk"&gt;post&lt;/a&gt; where we exported a solution from Power Platforms in order to commit to a source repo.&lt;/p&gt;

&lt;p&gt;If you manually exported the solution in Power Platform, it would normally offer to automatically increment the version by one. This post will demonstrate how to do it with DevOps Pipeline as well.&lt;/p&gt;

&lt;h1&gt;
  
  
  Setting the build number format
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsx6ad5n8u0x0v0vzwyjn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsx6ad5n8u0x0v0vzwyjn.png" alt="build number format"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This sets the format of the Pipeline's Build.BuildNumber property. What &lt;code&gt;1.0.1.$(rev:rr)&lt;/code&gt; means is that we want the version to be 1.0.1.x with x being appended by one each time.&lt;/p&gt;

&lt;h1&gt;
  
  
  Add Set Solution Version Step
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbmqowyl6ancpn4womltb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbmqowyl6ancpn4womltb.png" alt="Set Version"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Add the Set Solution Version task before the export solution task. This step will actually go into your Dev environment's solution and update the version number to be the same as the BuildNumber.&lt;/p&gt;

&lt;h1&gt;
  
  
  Running the pipeline
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbxtxj5tvhsumwmj76wk6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbxtxj5tvhsumwmj76wk6.png" alt="Pipeline"&gt;&lt;/a&gt;&lt;br&gt;
When you run the pipeline, notice that the version number has changed from just a number to now in the 1.0.1.x format.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6vj99abkvocf7gieez2n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6vj99abkvocf7gieez2n.png" alt="PR Solution"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you do a PR, you'll be able see that the version in the solution has also changed. &lt;/p&gt;

</description>
      <category>powerplatform</category>
      <category>dynamics365</category>
      <category>devops</category>
      <category>azuredevops</category>
    </item>
  </channel>
</rss>
