LogicApps – remember state of a subscribing trigger

LogicApps has two different kinds of triggers

  • Polling
  • Subscribing

The polling triggers are easy. Whenever the LogicApp is enabled and its trigger is scheduled, it will poll the source for new messages.

The subscribing triggers, like CDS(Dataverse)- and SQL-triggers, are a little harder.

Those triggers has state and remembers where it left off, so if you disable the logic app and re-enable it, then it will trigger for all of the items it has not yet seen since the last time the trigger fired.

This can give you massive problems, if you disabled the LogicApp for the purpose of mass-updating eg. SQL rows without triggering the LogicApp.
Continue reading “LogicApps – remember state of a subscribing trigger”

Azure Devops DACPAC deployment to Azure SQL overwrites database properties

We have a solution, where we use DACPAC deploy in an Azure Devops pipeline to maintain the Azure SQL database.

Apart from the normal issues (like adding not-null columns), this works ok.

But recently, the Query Store ran full, without SQL-server deleting old plans (as it was configured to)

I therefore increased the “Max Size” of the Query Store which solved the problem, but some time later, the “Max Size” value was reverted back to its default value (a measly 100MB)

It turns out, it was the DACPAC deployment that overwrites this setting and constantly reverts it.

The default value is specified in the database project settings in the VS project – under “Project settings” / “Database Settings” / “Optional”.

Here all the default values can be found, including 6 for the Query Store

It seems to be possible to avoid the DACPAC deployment to overwrite database-options as a whole.

Unchecking the “Deploy database properties” in the database project publish does not have any effect.

But here, they mention a “ScriptDatabaseOptions” which can be set to false when using a programmatic deploy using “DacServices“.

Checking the SqlPackage options (which can also be specified in an ‘Azure SQL Database deployment‘ task), this property is found

/p: ScriptDatabaseOptions=(BOOLEAN 'True') Specifies whether target database properties should be set or updated as part of the publish action.

So, it should be enough to add this in the “Additional SqlPackage.exe Arguments” box in Azure Devops


To me, it does not make sense to have the deployment-task overwrite these kinds of settings – at least you would then need to plan your deployments appropriately – expecially “emergency” like deployments to update values.

Azure Function Apps – does not deploy all dependencies

As can be found several places, an Azure Function is not always deployed with all dependencies to Azure – apparantly because Microsoft has added a list of “standard” libraries/packages that should always be available on the Azure platform

This results in a nasty error

Could not load file or assembly ‘System.Configuration.ConfigurationManager, Version=5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’. The system cannot find the file specified.”:”System.Configuration.ConfigurationManager, Version=5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″}

For instance here and here

The solution is to use the undocumented property _FunctionsSkipCleanOutput like this in the .csproj file

.. removed ..
.. removed ..

I my case, a used library System.Runtime.Caching was using the System.Configuration.ConfigurationManager library, and the latter was left out when deployed
This was on Microsoft.NET.Sdk.Functions (3.0.9)

Do not auto-enable a LogicApp when deployed

How to deploy a LogicApp in a “Disabled” state

In the LogicApp ARM template, you can specify an optional “state” value

“resources”: [
// Start logic app resource definition
“properties”: {
“state”: “”,
“definition”: {},
“parameters”: {}

Continue reading “Do not auto-enable a LogicApp when deployed”

Azure Function v1 Publish – DirectoryNotFoundException not found

During a recent migration between Azure tenants, I encountered the dreaded

Unhandled Exception: System.IO.DirectoryNotFoundException: The path `C:\REPOS\AzureFunctionsProject\obj\Release\net461\PubTmp\Out\bin` does not exist. Unable to generate Azure Functions extensions metadata file.

error when I tried to publish an Azure Function to the new tenant. And quite correctly, the ‘bin’ folder does not exist.

My “Microsoft.NET.Sdk.Functions” Version was “1.0.24” and it worked for me to follow the advise below to change that to use version 1.0.26 (by editing the .csproj file directly)
I probably ought to have tried with the newest version of the SDK, but time constraints in the project did not allow that.

Cant publish azure function unabe to generate azure function metadata

Azure “Logic Apps Management” does not render in “Incognito” browser

If you are using the “Logic Apps Management” solution in Azure Log Analytics to get an overview of the state of all your LogicApps, you may see that the solution-overview does not render. It simply seems to be trying to gather the data to show for eternity. This can also be seen, if you pin it to a dashboard

Logic Apps Management does not render in incognito mode

Continue reading “Azure “Logic Apps Management” does not render in “Incognito” browser”

Authenticating to Azure with AzCli og the Az Powershell module

When you only have access to one Azure directory, AzCLI and the Az Powershell module can figure out the Authentication itself, but if you have access to multiple directories on one user, you have to be more specific – especially if one of the directories uses MFA.
The typical “Get started” introductions does not cover this.

I have not tried it with multiple directories all requiring (different) MFA…

Continue reading “Authenticating to Azure with AzCli og the Az Powershell module”

Logic Apps: ForEach and Terminate actions

Sometimes the simplest things become hard(er)

Normally it is not a problem terminating the Logic App run by using a Terminate action. But when you are iterating over some kind of list using a “ForEach” action, you are suddenly not allowed to use a “Terminate” action anymore. And Logic Apps does not provide any other way to stop a Logic App run.

Continue reading “Logic Apps: ForEach and Terminate actions”

Unable to select Azure subscription in Visual Studio Logic Apps deployment

From time to time (or what seems like VERY often), you might not get the option for selecting your Azure subscription/resourcegroup in Visual Studio Logic Apps Designer, when you open a Logic Apps project. This happes even when you are logged into an Azure account.

Continue reading “Unable to select Azure subscription in Visual Studio Logic Apps deployment”