Close Menu
Peter Klapwijk – In The Cloud 24-7Peter Klapwijk – In The Cloud 24-7
    Facebook X (Twitter) Instagram
    Peter Klapwijk – In The Cloud 24-7Peter Klapwijk – In The Cloud 24-7
    • Home
    • Intune
    • Windows
      • Modern Workplace
    • macOS
    • Android
    • iOS
    • Automation
      • Logic Apps
      • Intune Monitoring
      • GitHub
    • Security
      • Passwordless
      • Security
    • Speaking
    • About me
    Peter Klapwijk – In The Cloud 24-7Peter Klapwijk – In The Cloud 24-7
    Home»Automation»Azure Logic Apps error; the template language expression is not valid
    Automation

    Azure Logic Apps error; the template language expression is not valid

    Peter KlapwijkBy Peter KlapwijkNovember 12, 2024Updated:February 14, 20252 Mins Read

    I was recently building a nice flow in Azure Logic Apps (which I will share soon ;)) when I faced a strange issue while trying to save the flow.

    I got two errors that didn’t immediately ring a bell to me:

    Workflow validation failed for the workflow ”. {“error”:{“code”:”InvalidTemplate”,”message”:”The template validation failed: ‘The template action ‘Until_Delete_windowsHelloForBusinessAuthenticationMethod’ at line ‘1’ and column ‘8632’ is not valid: \”The template language expression ‘sanitized’ is not valid: the string character ‘\”‘ at position ’89’ is not expected.\”.’.”}}

    Workflow validation failed for the workflow ‘LAEmergencyRevokeAccessv1.0’. The template validation failed: ‘The template action ‘Until_DELETE_microsoftAuthenticatorAuthenticationMethod’ at line ‘1’ and column ‘10199’ is not valid: “The template language expression ‘equals(outputs(‘HTTP_GET_authentication_methods’)?[‘statusCode’],”204″)’ is not valid: the string character ‘”‘ at position ’65’ is not expected.”.’.

    Of course, the errors show the names of the actions that throw the error, but when I looked up the actions in the new designer, nothing seemed wrong to me. The errors were related to an Until action. And as in one of the actions, number 204 was entered, it must have something to do with that. But to my knowledge, nothing seems wrong.

    I switched to Code view and searched for the Until action and number 204. At first, I didn’t see an issue with the code but wondered if it has to do with the double quotation marks or back slash next to the number.

    Luckily, I had made a clone of the flow before I faced the issue to compare the code of both flows.
    And indeed after changing ,\”204\”)” into ,0204)” I could save the flow again.

    After a while when I added other actions to the flow, I faced the issue again and again. Even when I completely rebuilt the flow, the error popped up as soon as I added multiple Until actions in my flow.
    It seems the new designer adds the quotation marks and backslashes for no reason to the flow.

    Because of that, I filed a bug at GitHub.

    But as I don’t know how long it takes; I decided to share the simple solution for this annoying bug here in case anybody else faces the issue. It might be related to the new designer, as I have never faced the issue before. But unfortunately, the legacy designer isn’t available for me anymore, so I can’t test that.

    Logic Apps Power Automate
    Share. Facebook Twitter LinkedIn Email WhatsApp
    Peter Klapwijk
    • Website
    • X (Twitter)
    • LinkedIn

    Peter is a Security (Intune) MVP since 2020 and is working as Modern Workplace Engineer at Wortell in The Netherlands. He has more than 15 years of experience in IT, with a strong focus on Microsoft technologies like Microsoft Intune, Windows, and (low-code) automation.

    Related Posts

    Activate Bing Chat Enterprise

    July 26, 2023

    Create an application-based Azure AD group with Logic Apps

    May 9, 2022

    Export Endpoint Analytics Proactive remediation data with Logic Apps

    April 19, 2021
    Add A Comment
    Leave A Reply Cancel Reply

    Peter Klapwijk

    Hi! Welcome to my blog post.
    I hope you enjoy reading my articles.

    Hit the About Me button to get in contact with me or leave a comment.

    Awards
    Sponsor
    Latest Posts

    Create deployment ring groups for Microsoft Intune

    June 27, 2025

    Update Windows Defender during Windows Autopilot enrollments

    May 16, 2025

    Hide the “Turn on an ad privacy feature” pop-up in Chrome with Microsoft Intune

    April 19, 2025

    How to set Google as default search provider with Microsoft Intune

    April 18, 2025
    follow me
    • Twitter 4.8K
    • LinkedIn 6.1K
    • YouTube
    • Bluesky 1.5K
    Tags
    Administrative Templates Android Automation Autopilot Azure Azure AD Browser Conditional Access Edge EMS Exchange Online Feitian FIDO2 Flow Google Chrome Graph Graph API Identity Management Intune Intune Monitoring iOS KIOSK Logic Apps macOS MEM MEMMonitoring Microsoft 365 Microsoft Edge Microsoft Endpoint Manager Modern Workplace Office 365 OneDrive for Business Outlook Passwordless PowerApps Power Automate Security SharePoint Online Teams Windows Windows 10 Windows10 Windows 11 Windows Autopilot Windows Update
    Copy right

    This information is provided “AS IS” with no warranties, confers no rights and is not supported by the authors, or In The Cloud 24-7.

     

    Copyright © 2025 by In The Cloud 24-7/ Peter Klapwijk. All rights reserved, No part of the information on this web site may be reproduced or posted in any form or by any means without the prior written permission of the publisher.

    Shorthand; Don’t pass off my work as yours, it’s not nice.

    Recent Comments
    • Parth Savjadiya on Using Visual Studio with Microsoft Endpoint Privilege Management, some notes
    • Chris Johnson on Assign Deny Local Log On user right to an (Azure) AD group by using Microsoft Intune
    • Northernsky on Automatically wipe a Windows 10 device after a number of authentication failures
    • Henrik on Intune Driver update for Windows – Get applicable devices
    • Adam on Get notified on expiring Azure App Registration client secrets
    most popular

    Application installation issues; Download pending

    October 1, 2024

    Restrict which users can logon into a Windows 10 device with Microsoft Intune

    April 11, 2020

    How to change the Windows 11 language with Intune

    November 11, 2022

    Update Microsoft Edge during Windows Autopilot enrollments

    July 9, 2024
    Peter Klapwijk – In The Cloud 24-7
    X (Twitter) LinkedIn YouTube RSS Bluesky
    © 2025 ThemeSphere. Designed by ThemeSphere.

    Type above and press Enter to search. Press Esc to cancel.

    Manage Cookie Consent
    To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
    Functional Always active
    The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
    Preferences
    The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
    Statistics
    The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
    Marketing
    The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
    Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
    View preferences
    {title} {title} {title}