Category: Microsoft
Category Archives: Microsoft
Problems with dynamic tables and charts
Good day,
I have a question with regards to dynamic tables and charts.
I set up three columns for five food types using an ActiveX combobox so that I can switch between different food types. This was done for 12 months for 5 products (per food type).
The first column is Product and has 60 rows. The second column is Sales volume and also has 60 rows and the third column is Month and also has 60 rows populated with data.
So, I want to create a line chart displaying the Months on the x-axis with a line for each product and Sales volume on the y-axis.
The problem is, when I set up the y-axis (vertical), I am extracting data from the Sales volume column which has 60 rows populated with data. This is populated perfectly in the chart.
I created two helper columns. One for the Products (since the products each repeat multiple times, I had to extract only the five products that I needed – which updates dynamically) and one for the Months (as there are 60 columns populated with month data, the months repeat multiple times).
When I however extract data from the Month helper column, Excel gets confused because it is now only extracting data from 12 columns (12 months) instead of the 60 columns for the Sales volume (y-axis).
So, when I try to populate the Months on the x-axis, Excel sees the 48 blank cells as data and I have tried just about everything to get it to ignore those columns, but nothing is working. I also can’t manually delete the blank columns from the horizontal axis data input for the line graph.
So, the months are squashed in so tightly that they are written over each other on the x-axis.
How do I fix this error? And also, how do I populate a line for each product for each food type in the dynamic chart? I am struggling with that as well.
I would really appreciate your help.
Kind regards,
Heinrich
Good day, I have a question with regards to dynamic tables and charts. I set up three columns for five food types using an ActiveX combobox so that I can switch between different food types. This was done for 12 months for 5 products (per food type). The first column is Product and has 60 rows. The second column is Sales volume and also has 60 rows and the third column is Month and also has 60 rows populated with data. So, I want to create a line chart displaying the Months on the x-axis with a line for each product and Sales volume on the y-axis. The problem is, when I set up the y-axis (vertical), I am extracting data from the Sales volume column which has 60 rows populated with data. This is populated perfectly in the chart. I created two helper columns. One for the Products (since the products each repeat multiple times, I had to extract only the five products that I needed – which updates dynamically) and one for the Months (as there are 60 columns populated with month data, the months repeat multiple times). When I however extract data from the Month helper column, Excel gets confused because it is now only extracting data from 12 columns (12 months) instead of the 60 columns for the Sales volume (y-axis). So, when I try to populate the Months on the x-axis, Excel sees the 48 blank cells as data and I have tried just about everything to get it to ignore those columns, but nothing is working. I also can’t manually delete the blank columns from the horizontal axis data input for the line graph. So, the months are squashed in so tightly that they are written over each other on the x-axis. How do I fix this error? And also, how do I populate a line for each product for each food type in the dynamic chart? I am struggling with that as well. I would really appreciate your help. Kind regards, Heinrich Read More
Defender for Endpoint License Consumption
Good day!
I just want to ask on how license consumption works in MDE. I have 5 devices onboarded to MDE using local script. All are AAD Joined and users with MDE license are logged in.
Upon checking on security.microsoft.com Settings>Endpoints>Licenses it shows that 0/20 licensed used but Monthly active devices are 5.
Can anyone help me with this?
TIA!
Good day! I just want to ask on how license consumption works in MDE. I have 5 devices onboarded to MDE using local script. All are AAD Joined and users with MDE license are logged in.Upon checking on security.microsoft.com Settings>Endpoints>Licenses it shows that 0/20 licensed used but Monthly active devices are 5.Can anyone help me with this? TIA! Read More
Project Online: SharePoint Custom Script control impact
In February 2024, Message Center post MC 714186 detailed changes coming to Custom Script settings in SharePoint Online. The MC post did not specifically call out Project Web App sites in Project Online, but it is impacted by these changes in a number of ways. There are settings to re-enable these features which will be explained later, but the typical issues reported by customers are:
Project Web App web parts are no longer listed as a web part Category
Save site as template is no longer available
Script Editor and Content Editor parts no longer available to add to a page (these are often used to add functionality to Project Web App)
Custom Fields added to Project Detail Pages (PDPs) do not ‘stick’ and although it looks like you added them, they are not present when you stop editing
Reports of 3rd party applications that automate steps like those above, have also been reported
Apart from the last bullet point, nothing breaks or stops working, just the steps to use these features will require an additional action to ‘unblock’ these scenarios. If you use custom script today, maybe a button that is set to publish all your projects, then this will still work, regardless of the settings described here. These settings only apply to changing things – for example if the code behind the button needed to be edited.
Steps to re-enable above features
Until November 2024 a single PowerShell command can be run which will ensure that any unblocking will last until November 2024. After that time, and if you do not run that script, you will need to unblock for each 24-hour period that you want to carry out any of the listed actions.
A tenant admin can choose to run a new PowerShell command in the SharePoint Management shell version 16.0.24524.12000 or later, after executing Connect-SPOService:
NOTE: When implementing this make sure you understand the security implications.
Connect-SPOService -Url https://<tenantname>-admin.sharepoint.com
Set-SPOTenant -DelayDenyAddAndCustomizePagesEnforcement $True
Even if the admin chooses to set this option, they will still need to proceed with the next steps to allow any of the changes bulleted at the top of this article to be carried out. The DelayDenyAddAndCustomizePagesEnforcement just avoids the setting getting revert after 24 hours. These steps will require a SharePoint Administrator to either run a PowerShell script or make a setting change in the SharePoint Admin Center. Be aware that the PWA admin, even though a site collection admin, may not be a SharePoint Admin.
Via PowerShell, for the PWA site they would need to run (after Connect-SPOService):
Set-SPOSite <SiteURL> -DenyAddAndCustomizePages 0
where <SiteURL> is your PWA site. Once complete, you should be able to carry out the options as usual. A quick check is to see if Save site as a template is present again in Site Settings.
Via SharePoint Admin Center, the admin would navigate to Sites, Active Sites, browse/search for the site and click the site name. In the pane that opens, navigating to the Settings tab will show an option for Custom scripts, which will say Blocked and have an option to Edit underneath.
Clicking Edit shows an option to set to Allowed rather than Blocked, along with some warning text, and a reminder that this will revert in 24 hours. This reminder shows even if the script to stop the reversion has been executed.
Clicking Save brings up further warnings, a link to the security implications article referenced above and requests for the change to be Confirmed.
The Active Sites list now has an additional column to expose the Custom script settings, along with a useful new filter than shows all sites where custom scripts are set to Allowed.
The SharePoint admin could also choose to revert the changes, either through the UI, or via PowerShell, once the changes had been completed, rather than weight for the automatic reversion after 24 hours. That probably isn’t a bad idea.
This change has been introduced because of concerns over what custom script can do, and the scenarios this affects are not usually ‘every day’ occurrences within PWA. However, I appreciate that this would require a SharePoint admin to get involved, which makes it more than a minor inconvenience. We are still exploring what other options we might have here, but best to plan to need to involve the SharePoint Admins when doing these kinds of edits in future. Although the issue uses the term ‘custom script’, many of the options that are blocked may not look like you are really doing any custom scripting – but it is more about what you ‘could’ be doing. For example, editing a PDP to just add an Enterprise Custom Field doesn’t add any custom script – but while editing you ‘could’ add a script editor web part that contains script. It is more to ensure a conscious decision is being made about these actions.
We are also working on a Learn.Microsoft.com article which should be out shortly. We should certainly have ensured the Message Center post also included Project Online explicitly, so sorry for the lack of communication and confusion around these changes.
Not applicable to PWA, but for reference.
One confusion is that the SharePoint Message Center post and subsequent article start off talking about the following section with the settings to allow users to run custom scripts on OneDrive and self-service created sites. Project Web App does not come under this category of site, so this setting does not need to be enabled for the above scenarios to work. The steps above are all that are needed. The settings page is also changing with the prevention on personal sites no longer being allowed to be changed. It may look like this:
Or the latest screenshot of SharePoint Classic settings section on Custom Script looks like this one. Either way, this doesn’t apply to Project Online sites.
Microsoft Tech Community – Latest Blogs –Read More
v24.151.0728.0003 (64 bits) – BUG (old) – cannot start sync a shared folder
The user received permission on a shared folder, she is able to create/rename/delete via web browser – everything is fine.
The problem starts when user try to sync that shared folder on her Windows 10 desktop :pouting_face:.
We realize that the OneDrive app, register a phisycal folder to it on the profile path, but never starts the sync – even wainting more than 01 hour.
If you go to the app settings and then try to ‘stop the sync’ nothing is stopped for real.
If you try to select some folder on that share resource, you can see an error like the image below. :pouting_face:
If we open a ticket with M365 Support team, they will aks to start the ‘OneDrive reset procedure’… We doing this almost every month for too many users with diferent computers (new one with fresh install and also old computers reinstalled from scratch) and the behavior is the same.
The only way is instruct user to use all files over browser while the computer is trying to reset the onedrive settings – that expend more than 04h.
—
Come on Microsoft developers!
We are in 2024, why OneDrive still uses ‘global.ini’ file instead to be using WINDOWS REGISTRY? Are MS planning to bring back the ‘Windows 3.11’????? :face_with_rolling_eyes:
—-
* M365 Tenant with users with ‘M365 E3’ license and Windows 10 Pro from Dell.
The user received permission on a shared folder, she is able to create/rename/delete via web browser – everything is fine.The problem starts when user try to sync that shared folder on her Windows 10 desktop :pouting_face:.We realize that the OneDrive app, register a phisycal folder to it on the profile path, but never starts the sync – even wainting more than 01 hour. If you go to the app settings and then try to ‘stop the sync’ nothing is stopped for real.If you try to select some folder on that share resource, you can see an error like the image below. :pouting_face: If we open a ticket with M365 Support team, they will aks to start the ‘OneDrive reset procedure’… We doing this almost every month for too many users with diferent computers (new one with fresh install and also old computers reinstalled from scratch) and the behavior is the same.The only way is instruct user to use all files over browser while the computer is trying to reset the onedrive settings – that expend more than 04h. —Come on Microsoft developers!We are in 2024, why OneDrive still uses ‘global.ini’ file instead to be using WINDOWS REGISTRY? Are MS planning to bring back the ‘Windows 3.11’????? :face_with_rolling_eyes:—-* M365 Tenant with users with ‘M365 E3’ license and Windows 10 Pro from Dell. Read More
Number of days + or –
I am trying to get the difference in the number of days between two dates and it works if the target completion date is before the completion date using this formula: =DATEDIF(H3,J3,”d”). I do get the correct number of days using this formula, however, I would ideally like is a plus or minus in front of that number (e.g., + if the project went past the target date, and – if the project was completed sooner). I can apply conditional formatting to the rows after to change the color of the number if I get that far.
When the completion date is before the target completion date (e.g., completed project early), I get the #NUM! error, which I expected. But I cannot find a way to get exactly what I am looking for. Hopefully I am explaining this clearly. The formula in L4: =DATEDIF(H4,J4,”d”)
I am trying to get the difference in the number of days between two dates and it works if the target completion date is before the completion date using this formula: =DATEDIF(H3,J3,”d”). I do get the correct number of days using this formula, however, I would ideally like is a plus or minus in front of that number (e.g., + if the project went past the target date, and – if the project was completed sooner). I can apply conditional formatting to the rows after to change the color of the number if I get that far. When the completion date is before the target completion date (e.g., completed project early), I get the #NUM! error, which I expected. But I cannot find a way to get exactly what I am looking for. Hopefully I am explaining this clearly. The formula in L4: =DATEDIF(H4,J4,”d”) Read More
scheduling issue
My settings are correct but an appointment was set in times that I’m both set not available and that I have another person already scheduled for they set an appointment for 1pm tomorrow but the system put them in at 6am instead and I already a have someone already in the 1pm slot. I have it set up that client can’t make appointments for anything until 1pm and why the system it placing a 1pm appointment at 6am I have know Idea if you all didn’t send the email about the appointment I would not have know it was even there. Also none of my appointments from my outlook calendar are on the bookings page at all.
My settings are correct but an appointment was set in times that I’m both set not available and that I have another person already scheduled for they set an appointment for 1pm tomorrow but the system put them in at 6am instead and I already a have someone already in the 1pm slot. I have it set up that client can’t make appointments for anything until 1pm and why the system it placing a 1pm appointment at 6am I have know Idea if you all didn’t send the email about the appointment I would not have know it was even there. Also none of my appointments from my outlook calendar are on the bookings page at all. Read More
launch excel from access
Is there a way to launch or jump to excel from a form in access?
Is there a way to launch or jump to excel from a form in access? Read More
Allow use of One Time Password
Hello,
We have setup Passwordless authentication using Conditional Access Policies, which is working great. The question I have is how can I setup the option to allow the use of the one time password (6 digit code in the authenticator) to be used when the mobile device is offline and cannot receive the number matching. For example, the user is in a plane and has purchased the use of WiFi for the laptop, but the phone is offline and want to use the 6 digit code from the authenticator.
Hello, We have setup Passwordless authentication using Conditional Access Policies, which is working great. The question I have is how can I setup the option to allow the use of the one time password (6 digit code in the authenticator) to be used when the mobile device is offline and cannot receive the number matching. For example, the user is in a plane and has purchased the use of WiFi for the laptop, but the phone is offline and want to use the 6 digit code from the authenticator. Read More
Trouble updating a single field in a sharepoint list item with automate
Greetings!
Not sure if this is the right forum, but…
I am having a bit of a problem. I have a Sharepoint List where, amongst other fields, a field of multiple “Person or Group” type exists, let us call it fieldA. I have a workflow with a trigger for created or changed item. There is a condition in it where, when reached, must change a simple string field in the item that triggered it.
I go and get the item and then try to use the Update Item action. Now my problem starts.
I have read, whether it is correct or not, that the update item MUST be given all values which cannot be empty in the list. And when I try to do my update without setting values for the mandatory fields, I promptly get an error message when I try to save the workflow. However, when I place a reference to the value I got as current for fieldA, it says that I am trying to alter a read only property, DisplayName, even though I am just using the current value.
Is there not a way to change just a single field without even trying to touch the others? And if there is not, how do I go around this silliness of it apparently detecting that an equal Person means I am trying to change the DisplayName?
Thanks!
Greetings!Not sure if this is the right forum, but…I am having a bit of a problem. I have a Sharepoint List where, amongst other fields, a field of multiple “Person or Group” type exists, let us call it fieldA. I have a workflow with a trigger for created or changed item. There is a condition in it where, when reached, must change a simple string field in the item that triggered it.I go and get the item and then try to use the Update Item action. Now my problem starts.I have read, whether it is correct or not, that the update item MUST be given all values which cannot be empty in the list. And when I try to do my update without setting values for the mandatory fields, I promptly get an error message when I try to save the workflow. However, when I place a reference to the value I got as current for fieldA, it says that I am trying to alter a read only property, DisplayName, even though I am just using the current value.Is there not a way to change just a single field without even trying to touch the others? And if there is not, how do I go around this silliness of it apparently detecting that an equal Person means I am trying to change the DisplayName?Thanks! Read More
Inside PnP Modern Search Web Part, how i can show the Date Time in the sharepoint local time zone
I am working on a SharePoint online site collection which have this regional settings:-
And i have a SharePoint column of type Date/Time, now inside SharePoint list view the date/time will be show as follow:-
which respect the site regional settings. now for the above site column >> i have a managed property and when i am showing this manage property inside the PnP Modern Search Result web part i will get the value based on UTC, as follow:-
so how i can show the date/time inside my Search Result to be equal to what is shown inside the list view?
Here is how i am rendering the column value inside the Search Result web part settings (resource.fields.RefinableDate01):-
I am working on a SharePoint online site collection which have this regional settings:- And i have a SharePoint column of type Date/Time, now inside SharePoint list view the date/time will be show as follow:- which respect the site regional settings. now for the above site column >> i have a managed property and when i am showing this manage property inside the PnP Modern Search Result web part i will get the value based on UTC, as follow:- so how i can show the date/time inside my Search Result to be equal to what is shown inside the list view?Here is how i am rendering the column value inside the Search Result web part settings (resource.fields.RefinableDate01):- Read More
Moving Bookmark in Edge in Windows 11
I absolutely love, MICROSOFT EDGE Whoever decided to set it up with the Chromium Platform is my positive vote. What I don’t like in MICROSOFT EDGE is how bookmarks can be placed in the top toolbar/tashbar that I use most often such as bank, calendar, and Gmail. Why was it set up in such a frustrating way is beyond me. It is also a waste of time and energy. Why wasn’t moving bookmarks set up like it is in Google Chrome? All I have to do is put in the page I want to bookmark and move it to the top taskbar/toolbar.
I absolutely love, MICROSOFT EDGE Whoever decided to set it up with the Chromium Platform is my positive vote. What I don’t like in MICROSOFT EDGE is how bookmarks can be placed in the top toolbar/tashbar that I use most often such as bank, calendar, and Gmail. Why was it set up in such a frustrating way is beyond me. It is also a waste of time and energy. Why wasn’t moving bookmarks set up like it is in Google Chrome? All I have to do is put in the page I want to bookmark and move it to the top taskbar/toolbar. Read More
How-To Migrate ConfigMgr Apps to Intune Win32Apps
Hi, Jonas here!
Or as we say in the north of Germany: “Moin Moin!“
I’m a Microsoft Cloud Solution Architect and a while back I was asked on how to migrate ConfigMgr apps to Intune. The result is a PowerShell script which can be used to analyze ConfigMgr apps and migrate them to Intune.
This article starts with a general overview about the process and contains an FAQ section instead of long text sections explaining everything in detail.
If you haven’t seen my other articles yet, feel free to check them out here: https://aka.ms/JonasOhmsenBlogs
Preparation
Before running any migration step, it is important to validate if a migration makes sense and saves time and resources compared to new apps created in Intune.
That decision depends on the following factors:
How many apps need to be migrated
If the apps we want to migrate can be migrated at all
If the migration would save time and resources compared to creating new apps in Intune
If there is an automated process in place to create apps in ConfigMgr, it might be better to change the process to automatically create the same apps in Intune and not migrate anything from ConfigMgr
If you are licensed to use the Intune Enterprise App Catalog. Take a look at the catalog and make sure to not migrate already existing applications. Read more about the Intune Enterprise App Catalog here
Migration process and prerequisites
The script I created to migrate apps from ConfigMgr to Intune has three modes which should run one after the other.
NOTE: The script does not require admin permissions as long as it has write permissions to the export folder (applies to all three modes). See “Process steps” for more details.
Step1 GetConfigMgrAppInfo
Exports ConfigMgr application metadata to a given folder.
This step will also analyze the metadata for any incompatible settings. See FAQ section for more details.
Requirements for this mode:
At least application read permissions in ConfigMgr
ConfigMgr admin console or ConfigMgr PowerShell CmdLets are not required.
Step1.1 Manually analyze the application metadata
While this is not a step of the script, it is important to validate the script output before going forward. More information can be found in the next section and the FAQ section down below.
Step2 CreateIntuneWinFiles
The step will compress the ConfigMgr app source data to create an intunewin file. (Required to be able to create win32apps in Intune)
Requirements for this mode:
The script will download the IntuneWinAppUtil.exe tool if not already present. See FAQ section for manual instructions.
At least read permissions for ConfigMgr app source path.
Connection to ConfigMgr not required.
Step3 UploadAppsToIntune
Creates a win32app in Intune and uploads the previously created intunewin file.
Requirements for this mode:
The script will install module: “Microsoft.Graph.Authentication” if not already present. See FAQ section for manual instructions.
The script requires the “DeviceManagementApps.ReadWrite.All” permission in the Microsoft Graph PowerShell Entra ID app. The script will ask to approve the permission if not already done. See FAQ section for more details. (Custom app registration possible)
Connection to ConfigMgr not required.
As already mentioned, please also have a look at the FAQ section further down below to better understand the script and its logic.
Get the script from here: Invoke-ConfigMgrAppMigrationToIntune.ps1
Process steps:
Run the script in “Step1GetConfigMgrAppInfo” mode like this:
IMPORTANT: Change all parameter values to match your environment for all commands mentioned in this blog post.
.Invoke-ConfigMgrAppMigrationToIntune.ps1 -Step1GetConfigMgrAppInfo -Sitecode ‘P02’ -Providermachinename ‘CM02.contoso.local’ -ExportFolder ‘E:ExportToIntune’
NOTE: This step will first create the export folder if not already there and some sub-folders explained in the FAQ section.
Select some or all apps to let the script analyze if a migration would be possible.
In most cases it makes sense to select all apps to get as much data as possible.
Metadata for each selected app will then be exported into the defined export folder.
Read more about the folders and files in the FAQ section.
There are multiple options to read the result of the analysis done by the script.
IMPORTANT: It is important to validate the output to understand why it might not be possible to migrate an app. Also, some settings will be ignored by the script and the app might look and behave differently in Intune.
Option 1: Open the exported CSV file in Excel. “<ExportFolder>AppDetailsAllAps.csv”
Each column starting with “Check” contains information about one of the many checks done by the script.
Read more about the checks in the FAQ section.
Option 2: Open the JSON file: “<ExportFolder>AppDetailsAllAps.json” in a text editor and validate the result there.
Option 3: View the results in a PowerShell Grid-View.
Follow the next instruction to open the result in a PowerShell Grid-View.
Now run the script in “Step2CreateIntuneWinFiles” mode with the following parameters to create intunewin files for selected apps.
.Invoke-ConfigMgrAppMigrationToIntune.ps1 – Step2CreateIntuneWinFiles -ExportFolder ‘E:ExportToIntune’
NOTE: If not already present, this step will download the “IntuneWinAppUtil.exe” tool to “<ExportFolder>Tools”
NOTE: The export folder can also be copied to another system. Just make sure that the parameter “-ExportFolder” points to a folder with previously exported data.
All the checks are shown in the Grid-View. Scroll to the right in order to see the check results.
Either hit “Cancel” to close the window or “OK” to create intunewin files for selected apps.
NOTE: Only apps marked with “AppImportToIntunePossible = Yes” can be imported to Intune. Validate the check results to find the exact reason in case an import is not possible. Checks are marked with “NO IMPORT” in that case.
The last step is to run the script in “Step3UploadAppsToIntune” mode.
.Invoke-ConfigMgrAppMigrationToIntune.ps1 -Step3UploadAppsToIntune -ExportFolder ‘E:ExportToIntune’
NOTE: If not already present, this step will install PowerShell module: “Microsoft.Graph.Authentication”.
“Nuget” will also be installed in case we need to download “Microsoft.Graph.Authentication”.
NOTE: Only apps marked with “IntunewinFileExists=Yes” and “AppImportToIntunePossible = Yes” can be imported to Intune.
Select one or all apps and hit “OK” to start the app import to Intune.
Repeat the steps as often as needed and also check out the FAQ section down below. 😉
FAQ section
This section should help understand the solution better and what it can and cannot do.
What type of app can the script export from ConfigMgr?
At the moment the script can only handle exe/script apps and no other type like imported MSI files or appx packages.
Does the script require admin permissions to run?
No. The script can run as long as it has write permissions to the export folder.
Do I need the ConfigMgr console installed or ConfigMgr PowerShell cmdlets to run the script?
No, the script will make a direct call to the SMS Provider.
Can I download the IntuneWinAppUtil.exe tool manually?
Yes. If you need to run step2 (create intunewin files) on a machine without internet access, download the tool from here: https://github.com/Microsoft/Microsoft-Win32-Content-Prep-Tool and place it in a “Tools” folder in the export folder.
What temp folder does the IntuneWinAppUtil.exe tool use?
The tool will compress the source files to the users temp folder. (The user running the script)
Currently the tool does not have a parameter to change the path. So, make sure the C: drive has enough space to compress the files.
Example path: “C:Users<UserName>AppDataLocalTemp”
Can I install PowerShell module Microsoft.Graph.Authentication manually?
Yes. Run: “Install-Module -Name Microsoft.Graph.Authentication”
Or consult the documentation here: https://learn.microsoft.com/en-us/powershell/microsoftgraph/installation
What does “AppImportToIntunePossible = No” mean?
The script detected a hard blocker and cannot import the app into Intune.
The reason is visible in one of the check columns and marked with: “NO IMPORT”
See section: “What checks will the script run against ConfigMgr app metadata?” for more details.
What does “AllChecksPassed = No” mean?
The script does a series of checks to validate if an app can be migrated without a difference.
If one of the checks failed, the app will be marked with “AllChecksPassed = No”.
It is still possible to create the app in Intune, but the app might behave differently.
Make sure to understand the implications of the specific check result.
Either change the app in ConfigMgr or copy and change the new app to avoid any issues with the app.
See section: “What checks will the script run against ConfigMgr app metadata?” for more details.
What does “IntunewinFileExists=No” mean?
No means, step2 of the script has not yet run to create an intunewin file for the app.
Only apps with content can be migrated by the script.
Re-run the script with parameter “-Step2CreateIntuneWinFiles” to create the files for the apps.
What files and folders will the script create?
The following table contains all the folders and files the script will create.
File or folder
Description
<ExportFolder>AppDetails
Folder containing data related to ConfigMgr apps
AllApps.json
JSON file containing a list of all selected apps with typical ConfigMgr data and Intune related data for a later import in Intune.
It also contains the result of the analyze step to be able to validate if an app can or cannot be imported to Intune.
The JSON format is just to make it easier to read and parse with the human eye.
The file is not used by the script in any other way and is just created for convenience.
AllApps.xml
Contains the same information as in the JSON but also contains object type information.
Therefore the file can easily be “re-used” with command “Import-Clixml” in any PowerShell session.
It is used when the script runs in any of the other modes as a base. When the contents of the export folder has been copied to another system for example.
AllApps.csv
The same info as in the AllApps.json file but in csv format.
That way the data could be analyzed and filtered in Excel.
The file is not used by the script in any other way and is just created for convenience.
Application_<ConfigMgr App GUID>.json
The same info as in the AllApps.json but for a single app.
The file is not used by the script in any other way and is just created for convenience.
Application_<ConfigMgr App GUID>.xml
The same info as in the AllApps.xml but for a single app.
The file is not used by the script in any other way and is just created for convenience.
Application_<ConfigMgr App GUID>-Intune.json
JSON file containing the Intune JSON definition to create a win32app in Intune.
The file is not used by the script in any other way and is just created for convenience.
To be able to troubleshoot or use the file to create the app manually in Graph Explorer https://aka.ms/ge for example.
<ExportFolder>Icons
Folder containing app icons
Icon_<Icon-ID>.png
If the exported ConfigMgr app has an icon, the icon will be exported to be able to upload the icon to Intune.
<ExportFolder>Scripts
Folder containing detection scripts
DeploymentType_<DeploymentType-GUID>.ps1″
If the app’s deployment type has a detection script set, the script will be exported to the “Scripts” folder.
Note: Script Global Conditions used as requirements are not handled by the script.
<ExportFolder>Tools
Folder containing tools.
The script will download the IntuneWinAppUtil.exe file to be able to create “.intunewin” files to the tools folder.
<ExportFolder>Win32Apps
Folder containing created intunewin files.
<ConfigMgr App GUID> <DeploymentType-GUID>.intunewin
The intunewin file per deployment type created by step two of the script.
Each app has its own folder.
<ConfigMgr App GUID> <DeploymentType-GUID>.log
Log file created by the IntuneWinAppUtil.exe tool containing the result of the compress operation.
What happens if the script runs again?
That depends on the step/mode the script runs in.
Step1GetConfigMgrAppInfo
If the export folder exists, the script will load the existing AllApps.* files and replace any existing applications. That way the files should always contain accurate data about ConfigMgr apps.
NOTE: That will reset the state: “IntunewinFileExists=Yes” and the content needs to be compressed into an intunewin file again.
Step2CreateIntuneWinFiles
The script will simply replace any previous created intunewin files for selected applications.
Step3UploadAppsToIntune
The script can be run in this mode as often as needed and does not act differently when run twice or more.
Existing applications will not be overwritten. Instead a new application with the same name will be created in Intune.
In case of an error, delete the application in Intune and run the script again. Maybe fix the error if you can.
What checks will the script run against ConfigMgr app metadata?
The following list contains the checks made by the script and a list of unsupported scenarios.
Unsupported can either mean not implemented in the script or unsupported by Intune.
Supersedence and dependencies
While Intune supports supersedence and dependencies in Win32Apps, the script currently does not. Set any dependency or supersedence after an app has been imported in Intune.
Tags
The script currently ignores tags.
Custom return codes
While Intune supports custom return codes, the script will ignore them.
Add them later to the Intune Win32App if required.
Requirements
While Intune supports requirements, the script will ignore ConfigMgr requirements at the moment. But since Intune requires at least a selection for architecture type and minimum operating system version, the script will set a requirements for x86 and x64 bit as well as Windows 10 1607 as a minimum.
Consider the use of a PowerShell script as a replacement for complex ConfigMgr requirements.
More than one deployment type
Intune does not support multiple DeploymenTypes and therefore the script will mark the app with: “AppImportToIntunePossible = No”.
As a workaround copy the app in ConfigMgr and remove any DeploymentTypes except one and re-run the script to import the app in Intune.
Logon requirement other than: “Whether or not a user is logged on”
There is no option to wait for a user to logon in Intune. The app can still be imported, but the setting is ignored.
Allow Interaction
There is no option to allow interaction in Intune. The app can still be imported, but the setting is ignored. As a workaround the ServicesUI.exe from the Microsoft Deployment Toolkit (MDT) can be used to allow some form of interaction with the end-user.
Program visibility other than “hidden” or “normal”
There is no option for program visibility in Intune. The app can still be imported, but the setting is ignored.
Unknown setup file extension
If the setup command is missing a known file extension the script will mark the app with: “AppImportToIntunePossible = No”.
Example: “install” and not “install.exe”
Different uninstall content
If the uninstall content is not the same as the install content the app can still be imported, but the uninstall content is ignored.
As a workaround copy the app and copy the uninstall content into the install content folder. Then re-run the script to import the app in Intune.
Missing uninstall command line
An uninstall string is required to create the app in Intune. Therefore the script will mark the app with: “AppImportToIntunePossible = No”.
Repair command
Intune currently does not have a repair command option. The app can still be imported, but the setting is ignored.
SourceUpdateProductCode for MSI repairs
Intune currently does not have an option for SourceUpdateProductCode. The app can still be imported, but the setting is ignored.
Exe to close before execution
Intune currently does not have an option to close an exe before running the installation. The app can still be imported, but the setting is ignored.
As a workaround use a script to close an exe before running an installation command and use that as a single script to install the app.
Detection rules with OR operator and limited support for rules with groups
In ConfigMgr it is possible to create detection rules arranged in groups and with the OR operator. While Intune does support multiple detection rules, it does not currently support the OR operator for them.
In that case all detection rules will be created in Intune, but the OR operator will be ignored.
The app should either be corrected before or after the upload.
Consider the use of a detection script with the same check logic instead.
Detection rules with unsupported operators
Some operators are not available in Intune at the moment. Like “EndsWith” for example.
The app can still be created, but the detection rule with an unsupported operator will be ignored.
Consider the use of a detection script with the same check logic instead.
The script will replace UNC install strings with just the command
In case an app directly runs an install command from an UNC path (which typically should not be the case) the script will set the UNC path as the source path.
Does the script account for all the possible ConfigMgr app configurations?
Unfortunately not. While I tried to integrate as many different options for detection methods and other app settings, I cannot guarantee a complete integration of every settings combination.
That also means you should always double check any imported app into Intune.
Is the script meant for large scale app migrations?
The script was designed to migrate a specific set of apps and is not capable of accounting for all the possible ConfigMgr app configurations. It should work even with a large list of ConfigMgr apps, but I never tested to export more than 1000 apps.
It is also not designed to run as a task nor track changes in ConfigMgr and keep apps in Intune up to date.
Can the script run in silent mode in the background?
No, it is designed for user input. But since it is a PowerShell script, it could be changed to run silently if that is what you need.
What Entra ID permission is required to import applications in Intune?
The script needs the “DeviceManagementApps.ReadWrite.All” permission in order to create new win32apps.
What Entra ID app registration will the script use?
The script will use the default Microsoft Graph PowerShell Modules Entra ID app.
Typically called: “Microsoft Graph Command Line Tools” (Other names possible)
AppID = 14d82eec-204b-4c2f-b7e8-296a70dab67e
Can I use a custom Entra ID app registration to run the script?
Yes, create an Entra ID app registration with the following permission: “DeviceManagementApps.ReadWrite.All”
Then run the script with the “-EntraIDAppID” parameter and use the app ID as the value.
You also need to add the tenant ID or domain name via parameter: “-EntraIDTenantID”
The full command would look like this:
.Invoke-ConfigMgrAppMigrationToIntune.ps1 -Step3UploadAppsToIntune -ExportFolder ‘E:ExportToIntune’ -EntraIDAppID ‘365908cc-fd28-43f7-94d2-f88a65b1ea21’ -EntraIDTenantID ‘contoso.onmicrosoft.com’
What happens if I change any of the files created by the script manually?
Only the AllApps.xml file will be used by the script to create intunewin files and to upload data to Intune. For example, if you change an app name in that file, a new Intune win32app will later have that name.
All other files are just there for convenience.
Changes to the “.intunewin” content files will not be checked. So make sure to store them safely or create them directly before the upload to Intune.
What data is stored in an .intunewin file?
The generated .intunewin file contains all source setup files in an compressed and encrypted form and the encryption information itself. Please keep it in a safe place as your source setup files.
Read more about it here
How can I get more information about the script?
Either open the script in a text editor and have a look at the description or run the script without any parameters.
Disclaimer
Always validate the script output and make sure the Intune applications look and behave the same way as the original applications in ConfigMgr.
Do test every application before deploying the application to production systems.
Also, this sample script is not supported under any Microsoft standard support program or service. This sample script is provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of this sample script and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of this script be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use this sample script or documentation, even if Microsoft has been advised of the possibility of such damages.
I hope you enjoyed reading this blog post.
If you have any questions or concerns, please let me know in the comments or create an issue or pull request on GitHub.
Get the script from here: Invoke-ConfigMgrAppMigrationToIntune.ps1
Stay safe!
Jonas Ohmsen
Microsoft Tech Community – Latest Blogs –Read More
Multiple IF/OR Formula Help
There are 4 possible jobs, the following cells will contain either a “Yes or a “No” that they were completed:
Job cells are:
job 1 = X105, job 2 = AW105, job 3 = X133, job 4 = AW133
The first one of these job cells, in numerical order, to have a “yes”, needs to have the corresponding TD cell populate in cell AK178.
TD Cells are:
TD 1 = Q108, TD 2 = AP108, TD 3 = Q136, TD 4 = AP136
My problem is that there can be more than 1 job completed. Cell AK178 is for the 1st job that has a “yes”.
Cell AK179 needs to be populated with the next job that has a “yes” in numerical order.
So, if Job 1 is a “No”, Job 2 is a “Yes”, Job 3 is a “Yes”, and Job 4 is a “No”…….
then AK178 should equal AP108
and AK179 should equal Q136
or………….
If Job 1 is a “Yes”, Job 2 is a “No”, Job 3 is a “Yes”, and Job 4 is a “No”…….
then AK178 should equal Q108
and AK179 should equal Q136
I can write the formula for one but not if there are 2 completed jobs. Help please!!
There are 4 possible jobs, the following cells will contain either a “Yes or a “No” that they were completed:Job cells are:job 1 = X105, job 2 = AW105, job 3 = X133, job 4 = AW133 The first one of these job cells, in numerical order, to have a “yes”, needs to have the corresponding TD cell populate in cell AK178.TD Cells are:TD 1 = Q108, TD 2 = AP108, TD 3 = Q136, TD 4 = AP136 My problem is that there can be more than 1 job completed. Cell AK178 is for the 1st job that has a “yes”. Cell AK179 needs to be populated with the next job that has a “yes” in numerical order. So, if Job 1 is a “No”, Job 2 is a “Yes”, Job 3 is a “Yes”, and Job 4 is a “No”…….then AK178 should equal AP108and AK179 should equal Q136or………….If Job 1 is a “Yes”, Job 2 is a “No”, Job 3 is a “Yes”, and Job 4 is a “No”…….then AK178 should equal Q108and AK179 should equal Q136 I can write the formula for one but not if there are 2 completed jobs. Help please!! Read More
Azure geocoding vs bing maps
Hi folks,
I’m using Azure geocoding in an app and I am finding occasions when it’s really not working very well and returning low or medium confidence results. However, Bing maps with the same address finds the correct point on the map as do other services such as the UK Address finder app and Post Tag.
The following address highlights the issue well, although there are plenty of others:
Pentland View, Limekiln Road, Macbiehill, West Linton EH46 7BA
It’s as if Bing has better map data. Any help greatly appreciated.
Hi folks, I’m using Azure geocoding in an app and I am finding occasions when it’s really not working very well and returning low or medium confidence results. However, Bing maps with the same address finds the correct point on the map as do other services such as the UK Address finder app and Post Tag. The following address highlights the issue well, although there are plenty of others:Pentland View, Limekiln Road, Macbiehill, West Linton EH46 7BA It’s as if Bing has better map data. Any help greatly appreciated. Read More
Teams name picture
Why are some Teams names shown with a square and others with a circle?
Why are some Teams names shown with a square and others with a circle? Read More
Formula that searches multiple rows of data and returns value if multiple cells within rows match
I have a spreadsheet with 10,000+ rows of data within 5 columns (A, B, C, D, E). I need a formula that will check to see both of the following:
1. Does multiple cells in one row match exactly what any other row has? (Ie. Do cells A2, B2, and D2 together match any other row?) if so, then “Duplicate”
The example is listed below. There are multiple rows that have both the ID number and scholarship name but only row 1 and row 4 have matching ID number, scholarship name, AND season. I need the formula to be able to search all 10,000 rows in my spreadsheet and tell me if there are multiple rows that match in Columns A, B and D.
2. The next formula is to catch if someone has a two scholarships that conflict with one another.
Ie. someone cannot receive both a Presidential Scholarship and a Music Scholarship. I need a formula that will look through all 10,000 rows of these 5 columns and return “FLAG!” if an ID number in Column A match and has both the “Presidential SS” and “Music Sch” listed for the same season (in this instance “FALL”).
So because A1 and A3 both have the same ID, B1 and B3 show both scholarships, and D1 and D3 both list the same season “FALL”, I need G1 and G3 to both return “FLAG!”
Any assistance would be greatly appreciated!
I have a spreadsheet with 10,000+ rows of data within 5 columns (A, B, C, D, E). I need a formula that will check to see both of the following: 1. Does multiple cells in one row match exactly what any other row has? (Ie. Do cells A2, B2, and D2 together match any other row?) if so, then “Duplicate” The example is listed below. There are multiple rows that have both the ID number and scholarship name but only row 1 and row 4 have matching ID number, scholarship name, AND season. I need the formula to be able to search all 10,000 rows in my spreadsheet and tell me if there are multiple rows that match in Columns A, B and D. 2. The next formula is to catch if someone has a two scholarships that conflict with one another. Ie. someone cannot receive both a Presidential Scholarship and a Music Scholarship. I need a formula that will look through all 10,000 rows of these 5 columns and return “FLAG!” if an ID number in Column A match and has both the “Presidential SS” and “Music Sch” listed for the same season (in this instance “FALL”). So because A1 and A3 both have the same ID, B1 and B3 show both scholarships, and D1 and D3 both list the same season “FALL”, I need G1 and G3 to both return “FLAG!” Any assistance would be greatly appreciated! Read More
OneDrive Files On-Demand copying files to local folder
All, I have a Python script that copies files from a network folder to my server’s OneDrive folder and OneDrive is set up to save disk space by using Files On-Demand.
So, does that mean any files that I copy to that folder will not take up space on my server’s hard drive?
Because currently, that is not working?
What are some of the possible issues going on with this. I am copying quite a large number of files.
All, I have a Python script that copies files from a network folder to my server’s OneDrive folder and OneDrive is set up to save disk space by using Files On-Demand. So, does that mean any files that I copy to that folder will not take up space on my server’s hard drive?Because currently, that is not working? What are some of the possible issues going on with this. I am copying quite a large number of files. Read More
Simple Workflow to Replace Teams Incoming Webhooks
Replacing Teams Connectors
As you may be aware, Teams connectors have been deprecated (as discussed in Retirement of Office 365 connectors within Microsoft Teams). This means that a change to the connector URL must be made by December 31, 2024 (more information forthcoming) and that you should not create new webhooks by August 15th, 2024. After August 15th, 2024, you should be using the Power Automate Workflows app in Teams instead of webhooks.
The connectors are being retired for several reasons, including security, scalability and flexibility. These are all requests our customers have made repeatedly in the past.
Power Automate workflows are powerful 5th generation programs which use a drag-and-drop, graphical user interface (GUI) paradigm to allow powerful data transformations and selective publishing to Teams. There is a lot of information for Power Automate Workflow at Browse and add workflows in Microsoft Teams – Microsoft Support.
This article is not meant to make you an expert on Power Automate or Workflows. There are plenty of articles for you to read to become an expert. I just wanted to create an article on how you can recreate the original webhook experience. From there, you should be able to experiment with the new capabilities Workflows provide.
Replacing an Incoming Webhook
To replace the incoming connector, I’m going to start by creating a new team in my test tenant. All of this will be done using the Teams Web Client (because it’s easier for me to work with at present).
From the Teams blade, I’ll press the ‘+’ symbol and choose ‘Create team.’
I’ll name my team a really thought-provoking name like ‘Webhook-Replace’ and give it an awesome description. I’ll then click on the ‘Create’ button.
Teams will congratulate me for making such a great team with a great team name and ask me to add new members. I’ll add my System Admin account (just to make it easier for that account to delete this later) and Teams will drop me in the ‘General’ channel for this tab (all teams will have a default ‘General’ tab). Since it doesn’t matter to me where I make this webhook replacement, I’m fine with the General tab so I’ll just use it and not add another channel [Important Note: At the time I’m writing this, private channels do not work with Power Automate Workflows. My understanding is that they are working to expand Workflows to include private channels, but that work isn’t completed yet.]
Install Power Automate Workflows
Now, I need to install Power Automate Workflows into Teams. To do this, I’ll click on the ‘Apps’ button on the far-left vertical bar which will open up the apps I have available to install [Note: This list will be limited based on the App permission and App setup policies and/or App Centric Management. For App permission policies, if you don’t see Workflows in the Apps section, you need to discuss availability of this app with your Teams Administrator. Even if it appears in your apps, you may need to REQUEST the app in order to install it, depending on these policies. For App Centric Management, the App will need to be assigned to you in order to use it] In the apps application that opens up, you can type ‘Workflows’ in the ‘Search apps and more’ textbox to quickly find the app.
Click the ‘Add’ or ‘Install’ button. This will open the Workflows setup/information dialog. From here, you can do a few things. If you just click the ‘Add’ button, it will install/add the app as a ‘one-on-one chat app’. This is actually what I want, so that it allows me to determine as I design the workflow, how it acts. For a webhook replacement, this is what I recommend. You can use the down carat and choose to add to a team, chat or meeting but I will leave you to experiment with these features.
This adds the ‘Workflows’ app to the far-left application bar and opens the application.
This is the Workflows App in Teams. Personally, I don’t like using it because it will occasionally make suggestions or assumptions that go beyond what I really want to do. So, I almost always use the ‘open in browser’ option from the upper right.
This opens up the full Power Automate flow page. From the left, I’m going to choose the ‘Templates’ blade.
In the ‘Search templates’, I’ll enter ‘Teams Webhook’ and hit enter to find the webhook templates.
As you can see, you can start with a Teams template. The recommended template to begin with is ‘Post to a chat when a webhook request is received’ so that is what I will use here. We’ll change it after opening it and I’ll explain all of this in a moment.
Choosing the template opens the flow connection. The ‘This flow will connect to:’ should be pre-populated with your username and contain a green checkmark.
Click on ‘Continue’ and the flow will ask you which team and channel you wish to send to. Here, I’m going to use the dropdown to select ‘Webhook-Replace’ from my list of Teams. Then, I’ll choose the ‘General’ channel and choose to ‘Edit in advanced mode.’ You could simply choose ‘Create’ but that will automatically create the flow and we’ll need to edit it anyway.
Clicking ‘Edit in advanced mode’ will display the current flow template.
By default, this flow will take whatever is sent to the webhook and attempt to send it as an adaptive card. Generally, this won’t work. You need to do some transformation on the data, unless the application is sending an Adaptive Card – which most providers don’t do. Instead, most providers such as GitHub, send a JSON filled with data and events.
Going through how to connect GitHub is out of scope for this article, though I may follow up with a GitHub case in a new article later. Likewise, creating an adaptive card to present in the Teams channel is outside the scope of this article. I’m just going to show you a simple JSON dataset and how to send it to a channel. For this, I’m going to use a very simple CURL commandline (from Windows) with a very small, easy JSON payload.
It’s just a lame payload with text and ‘hello world’ but this is just an article to show a simple webhook replacement.
First, we need to get the URL from the ‘When a Teams webhook request is received’ step. Click on that step and it will open up the settings for the step. Copy the HTTP URL and place it in a safe place. (For me, I’ll use it in the Powershell curl.exe I have copied and pasted above).
Even though the JSON payload here is simplistic, I still need to have the flow process it. In order to do that, I’m going to need to add something to this flow. So, I’ll choose the ‘+’ button between the two existing flow steps (because I need to parse the JSON between those two steps) and choose to ‘Add an action’.
This opens the ‘Add an action’ popup on the left side. We want to process json, so I’ll enter ‘JSON’ in the search bar and look at my options. I see that ‘Data Oepration’ has a ‘Parse JSON’ option, so I’m going to choose that by clicking on it.
This adds the action between the two steps, exactly like I wanted.
This also opens the ‘Parse JSON’ settings because I still need to instruct this flow step on how to process the JSON content.
I’ll click in the ‘Content’ textbox. This will bring up the ‘actions’ choices on the right side of the textbox.
The lightning bolt means ‘Dynamic Content’. The ‘fx’ stands for formulas or expressions. I want to process Dynamic Content coming from the webhook step, so I’ll choose the lightning bolt. This brings up the potential content from the webhook step.
The ‘Attachments Adaptive Card’ will allow you to parse any Adaptive Cards coming into the webhook. ‘Attachments Item’ processes a single attachment included to the webhook package. The ‘Attachments’ collection are any multiple attachments to the package sent to the webhook. Finally, the ‘Body’ just gives you the body of the package sent to the webhook. Since I’m sending a simple JSON body, that’s what I want here.
Now, I have to supply the schema for the content I’m sending. At the very bottom of the textbox you have the option to ‘Use sample payload to generate schema.’ If you can’t write JSON Schema but you have a sample JSON payload that you’re sending, you can add it here and let the service process it. I’m going to do this, especially because this is such a simple payload.
Clicking on this opens a window where you can type or paste a sample payload. I’ll enter my simple payload here and click the ‘Done’ button at the lower right corner which will populate the schema.
You don’t need to ‘Save’ here; once entered it will remain until you change it.
As I said, creating an adaptive card is beyond the scope of this article, so I’m going to delete that. I’ll Select the ‘Send each adaptive card’ to open the ‘Settings on the left’. Next, I’ll click the three dots on the right side of that popup and choose ‘Delete.’
Now, I’ll click the ‘+’ circle under the ‘Parse JSON’ and choose ‘Add an action’ to send a message to my team’s channel.
This opens the ‘Add an action’ popup on the left. I want to add an action specific to Microsoft Teams, so I’ll select those from the available action categories.
This brings up available steps for Microsoft Teams. I’ll scroll down and find the one I’m looking for – ‘Post message in a chat or channel.’
This opens the ‘Post message in a chat or channel’ settings. From here, I’ll want to ‘Post As’ a ‘Flow bot’ (you can change this to a user but there’ll be other settings necessary; I’m happy with the ‘Flow bot’).
Next, I’ll drop down the ‘Post In’ selection box which will allow me to choose either a ‘channel’ or ‘group chat.’ Obviously, I want to post to a ‘channel’. Wait a second and this will open up further choices of which Team and channel. I’ll pick the ‘Webhook-Replace’ team and ‘General’ channel.
Finally, I’ll click in the ‘Message’ textbox. In this box, I can actually type a message to send – but I’m interested in more ‘Dynamic Content’ so I’ll choose the lightning bolt and from the ‘Parse Json’ step, choose ‘body text’ (Note: If you look back at the automatic schema generated in the ‘Parse JSON’ step, you’ll see that ‘text’ is the only ‘Propery’ in the ‘Properties’ collection so this will post the VALUE (string) from the ‘text’ property).
You might see that there are 2 ‘Advanced Parameters’ you can set. I’m not going to set them, but they will allow you to set a static or dynamic ‘Subject’ and ‘Hosted contents.’
With that, we’re done. From the bar on the upper right hand side of the screen we want to ‘Save’ the content (you can test with ‘flow checker’ if you want) and then click the ‘back’ arrow from the upper left on the same bar.
You’ll get a pop up that says ‘Your flow is ready to go’. Just click ‘Got it’. The flow will have a title the same as the template. You can click ‘Edit’ for the details action and rename it, add a description and so on. I’m not going to – it’s time to TEST!!
I click ‘enter’ on my Powershell curl.exe command and it processes!
Conclusion
As you can see, setting up a Power Automate webhook processor is not as simple as the old Teams ‘Incoming Webhook’ but it is much more scalable and flexible and, though I didn’t delve into the options here because this was a simple article to show how to replace the incoming webhook functionality, it can provide security to ensure that malicious actors can’t hijack your webhook and send data to your users.
Replacing Teams Connectors
As you may be aware, Teams connectors have been deprecated (as discussed in Retirement of Office 365 connectors within Microsoft Teams). This means that a change to the connector URL must be made by December 31, 2024 (more information forthcoming) and that you should not create new webhooks by August 15th, 2024. After August 15th, 2024, you should be using the Power Automate Workflows app in Teams instead of webhooks.
The connectors are being retired for several reasons, including security, scalability and flexibility. These are all requests our customers have made repeatedly in the past.
Power Automate workflows are powerful 5th generation programs which use a drag-and-drop, graphical user interface (GUI) paradigm to allow powerful data transformations and selective publishing to Teams. There is a lot of information for Power Automate Workflow at Browse and add workflows in Microsoft Teams – Microsoft Support.
This article is not meant to make you an expert on Power Automate or Workflows. There are plenty of articles for you to read to become an expert. I just wanted to create an article on how you can recreate the original webhook experience. From there, you should be able to experiment with the new capabilities Workflows provide.
Replacing an Incoming Webhook
To replace the incoming connector, I’m going to start by creating a new team in my test tenant. All of this will be done using the Teams Web Client (because it’s easier for me to work with at present).
From the Teams blade, I’ll press the ‘+’ symbol and choose ‘Create team.’
I’ll name my team a really thought-provoking name like ‘Webhook-Replace’ and give it an awesome description. I’ll then click on the ‘Create’ button.
Teams will congratulate me for making such a great team with a great team name and ask me to add new members. I’ll add my System Admin account (just to make it easier for that account to delete this later) and Teams will drop me in the ‘General’ channel for this tab (all teams will have a default ‘General’ tab). Since it doesn’t matter to me where I make this webhook replacement, I’m fine with the General tab so I’ll just use it and not add another channel [Important Note: At the time I’m writing this, private channels do not work with Power Automate Workflows. My understanding is that they are working to expand Workflows to include private channels, but that work isn’t completed yet.]
Install Power Automate Workflows
Now, I need to install Power Automate Workflows into Teams. To do this, I’ll click on the ‘Apps’ button on the far-left vertical bar which will open up the apps I have available to install [Note: This list will be limited based on the App permission and App setup policies and/or App Centric Management. For App permission policies, if you don’t see Workflows in the Apps section, you need to discuss availability of this app with your Teams Administrator. Even if it appears in your apps, you may need to REQUEST the app in order to install it, depending on these policies. For App Centric Management, the App will need to be assigned to you in order to use it] In the apps application that opens up, you can type ‘Workflows’ in the ‘Search apps and more’ textbox to quickly find the app.
Click the ‘Add’ or ‘Install’ button. This will open the Workflows setup/information dialog. From here, you can do a few things. If you just click the ‘Add’ button, it will install/add the app as a ‘one-on-one chat app’. This is actually what I want, so that it allows me to determine as I design the workflow, how it acts. For a webhook replacement, this is what I recommend. You can use the down carat and choose to add to a team, chat or meeting but I will leave you to experiment with these features.
This adds the ‘Workflows’ app to the far-left application bar and opens the application.
This is the Workflows App in Teams. Personally, I don’t like using it because it will occasionally make suggestions or assumptions that go beyond what I really want to do. So, I almost always use the ‘open in browser’ option from the upper right.
This opens up the full Power Automate flow page. From the left, I’m going to choose the ‘Templates’ blade.
In the ‘Search templates’, I’ll enter ‘Teams Webhook’ and hit enter to find the webhook templates.
As you can see, you can start with a Teams template. The recommended template to begin with is ‘Post to a chat when a webhook request is received’ so that is what I will use here. We’ll change it after opening it and I’ll explain all of this in a moment.
Choosing the template opens the flow connection. The ‘This flow will connect to:’ should be pre-populated with your username and contain a green checkmark.
Click on ‘Continue’ and the flow will ask you which team and channel you wish to send to. Here, I’m going to use the dropdown to select ‘Webhook-Replace’ from my list of Teams. Then, I’ll choose the ‘General’ channel and choose to ‘Edit in advanced mode.’ You could simply choose ‘Create’ but that will automatically create the flow and we’ll need to edit it anyway.
Clicking ‘Edit in advanced mode’ will display the current flow template.
By default, this flow will take whatever is sent to the webhook and attempt to send it as an adaptive card. Generally, this won’t work. You need to do some transformation on the data, unless the application is sending an Adaptive Card – which most providers don’t do. Instead, most providers such as GitHub, send a JSON filled with data and events.
Going through how to connect GitHub is out of scope for this article, though I may follow up with a GitHub case in a new article later. Likewise, creating an adaptive card to present in the Teams channel is outside the scope of this article. I’m just going to show you a simple JSON dataset and how to send it to a channel. For this, I’m going to use a very simple CURL commandline (from Windows) with a very small, easy JSON payload.
It’s just a lame payload with text and ‘hello world’ but this is just an article to show a simple webhook replacement.
First, we need to get the URL from the ‘When a Teams webhook request is received’ step. Click on that step and it will open up the settings for the step. Copy the HTTP URL and place it in a safe place. (For me, I’ll use it in the Powershell curl.exe I have copied and pasted above).
Even though the JSON payload here is simplistic, I still need to have the flow process it. In order to do that, I’m going to need to add something to this flow. So, I’ll choose the ‘+’ button between the two existing flow steps (because I need to parse the JSON between those two steps) and choose to ‘Add an action’.
This opens the ‘Add an action’ popup on the left side. We want to process json, so I’ll enter ‘JSON’ in the search bar and look at my options. I see that ‘Data Oepration’ has a ‘Parse JSON’ option, so I’m going to choose that by clicking on it.
This adds the action between the two steps, exactly like I wanted.
This also opens the ‘Parse JSON’ settings because I still need to instruct this flow step on how to process the JSON content.
I’ll click in the ‘Content’ textbox. This will bring up the ‘actions’ choices on the right side of the textbox.
The lightning bolt means ‘Dynamic Content’. The ‘fx’ stands for formulas or expressions. I want to process Dynamic Content coming from the webhook step, so I’ll choose the lightning bolt. This brings up the potential content from the webhook step.
The ‘Attachments Adaptive Card’ will allow you to parse any Adaptive Cards coming into the webhook. ‘Attachments Item’ processes a single attachment included to the webhook package. The ‘Attachments’ collection are any multiple attachments to the package sent to the webhook. Finally, the ‘Body’ just gives you the body of the package sent to the webhook. Since I’m sending a simple JSON body, that’s what I want here.
Now, I have to supply the schema for the content I’m sending. At the very bottom of the textbox you have the option to ‘Use sample payload to generate schema.’ If you can’t write JSON Schema but you have a sample JSON payload that you’re sending, you can add it here and let the service process it. I’m going to do this, especially because this is such a simple payload.
Clicking on this opens a window where you can type or paste a sample payload. I’ll enter my simple payload here and click the ‘Done’ button at the lower right corner which will populate the schema.
You don’t need to ‘Save’ here; once entered it will remain until you change it.
As I said, creating an adaptive card is beyond the scope of this article, so I’m going to delete that. I’ll Select the ‘Send each adaptive card’ to open the ‘Settings on the left’. Next, I’ll click the three dots on the right side of that popup and choose ‘Delete.’
Now, I’ll click the ‘+’ circle under the ‘Parse JSON’ and choose ‘Add an action’ to send a message to my team’s channel.
This opens the ‘Add an action’ popup on the left. I want to add an action specific to Microsoft Teams, so I’ll select those from the available action categories.
This brings up available steps for Microsoft Teams. I’ll scroll down and find the one I’m looking for – ‘Post message in a chat or channel.’
This opens the ‘Post message in a chat or channel’ settings. From here, I’ll want to ‘Post As’ a ‘Flow bot’ (you can change this to a user but there’ll be other settings necessary; I’m happy with the ‘Flow bot’).
Next, I’ll drop down the ‘Post In’ selection box which will allow me to choose either a ‘channel’ or ‘group chat.’ Obviously, I want to post to a ‘channel’. Wait a second and this will open up further choices of which Team and channel. I’ll pick the ‘Webhook-Replace’ team and ‘General’ channel.
Finally, I’ll click in the ‘Message’ textbox. In this box, I can actually type a message to send – but I’m interested in more ‘Dynamic Content’ so I’ll choose the lightning bolt and from the ‘Parse Json’ step, choose ‘body text’ (Note: If you look back at the automatic schema generated in the ‘Parse JSON’ step, you’ll see that ‘text’ is the only ‘Propery’ in the ‘Properties’ collection so this will post the VALUE (string) from the ‘text’ property).
You might see that there are 2 ‘Advanced Parameters’ you can set. I’m not going to set them, but they will allow you to set a static or dynamic ‘Subject’ and ‘Hosted contents.’
With that, we’re done. From the bar on the upper right hand side of the screen we want to ‘Save’ the content (you can test with ‘flow checker’ if you want) and then click the ‘back’ arrow from the upper left on the same bar.
You’ll get a pop up that says ‘Your flow is ready to go’. Just click ‘Got it’. The flow will have a title the same as the template. You can click ‘Edit’ for the details action and rename it, add a description and so on. I’m not going to – it’s time to TEST!!
I click ‘enter’ on my Powershell curl.exe command and it processes!
Conclusion
As you can see, setting up a Power Automate webhook processor is not as simple as the old Teams ‘Incoming Webhook’ but it is much more scalable and flexible and, though I didn’t delve into the options here because this was a simple article to show how to replace the incoming webhook functionality, it can provide security to ensure that malicious actors can’t hijack your webhook and send data to your users. Read More
Increment Number Based on Passing Specific Date and Time
Hello, I would like to know how to create a formula that would increment a number based on a certain date and time passing.
For example,
I would like a number to increase by 1 per day after 5pm.
I found how to increment based on a certain date passing:
+(TODAY() – DATE(2024,8,20)
but I would like to add a time.
Also, I am interested in learning how to make a formula where it will only increment if another cell is “N”
I was trying to use an “If” but was having trouble getting it to work.
=IF((B1=”N”,+(TODAY() – DATE(2024,8,20)),0)
does not work but I do not know how to fix it.
If there is anything that needs further explanation or is unclear please let me know.
Hello, I would like to know how to create a formula that would increment a number based on a certain date and time passing. For example, I would like a number to increase by 1 per day after 5pm. I found how to increment based on a certain date passing: +(TODAY() – DATE(2024,8,20) but I would like to add a time. Also, I am interested in learning how to make a formula where it will only increment if another cell is “N” I was trying to use an “If” but was having trouble getting it to work. =IF((B1=”N”,+(TODAY() – DATE(2024,8,20)),0) does not work but I do not know how to fix it. If there is anything that needs further explanation or is unclear please let me know. Read More
Cannot assign a macro to a button using simple shape – too complex to be assigned to object – Solved
I have this working in another workbook, in fact I copied that worksheet to this workbook. Since copying can carry the original workbook in some of the formulas (not all it seems), I right-clicked on my button (rectangle shape) to assign the macro, chose the macro from the list and received an error, ‘formula is too complex to be assigned to object’.
I passed this issue through ChatGPT and followed its suggestions for error checking.
I can run the macro on it’s own successfully, just can’t assign it to a button or any other of the macros for that matter. I have rebooted the laptop as well, no difference. Macros are enabled.
The filename for this workbook is: “C:Usersed.hickeyOneDrive – xxxxxxxx xxxxDocumentsEdsStuffxxxxxxxxx-xxxxxxxxxxxxxxxxxxx-xxxxxxxOrderingSpreadsheetsProductionReady1)xxxxxxxPredesignedBouquetProductLoadV7_20240719_IDWeddingBaby_33xxxxxxxx.xlsm”. The total length is 220 characters which is under the 260 char max for SharePoint. I changed the filename to a simple name of testv7.xlsm and it worked. It seems to be either length or a special character. My understanding is square brackets can cause this issue.
After reducing the length, the issue resolved itself. By taking one character from the filename, the problem is resolved.
These samples is creating a button and assigning it fresh – same result
after selecting the correct macro
and choose OK
I have this working in another workbook, in fact I copied that worksheet to this workbook. Since copying can carry the original workbook in some of the formulas (not all it seems), I right-clicked on my button (rectangle shape) to assign the macro, chose the macro from the list and received an error, ‘formula is too complex to be assigned to object’. I passed this issue through ChatGPT and followed its suggestions for error checking. I can run the macro on it’s own successfully, just can’t assign it to a button or any other of the macros for that matter. I have rebooted the laptop as well, no difference. Macros are enabled. The filename for this workbook is: “C:Usersed.hickeyOneDrive – xxxxxxxx xxxxDocumentsEdsStuffxxxxxxxxx-xxxxxxxxxxxxxxxxxxx-xxxxxxxOrderingSpreadsheetsProductionReady1)xxxxxxxPredesignedBouquetProductLoadV7_20240719_IDWeddingBaby_33xxxxxxxx.xlsm”. The total length is 220 characters which is under the 260 char max for SharePoint. I changed the filename to a simple name of testv7.xlsm and it worked. It seems to be either length or a special character. My understanding is square brackets can cause this issue. After reducing the length, the issue resolved itself. By taking one character from the filename, the problem is resolved. These samples is creating a button and assigning it fresh – same resultafter selecting the correct macroand choose OK Read More