I'm currently working on a Flow that adds members to an Office 365 Group/Team after an approval action. However, some members may not have Office 365 licenses yet and this causes the Flow to error out. Is there any way to check if a user is licensed before the Flow tries to add them to a Team? Is there a way to do this using an HTTP request rather than an Azure Function? Or, is there a pre-existing action that can do this?
Another way of approaching this is to set the "Configure run after" setting for the action(s) after the action causing the error. This will allow you to move on even if there is an error.
Let me know if you need an example.
I had considered using the "Configure run after" setting but it isn't available on the affected action item. It is only available two levels up. Plus, if I set up the "Configure run after" feature to continue even after a fail, I won't know that something had gone wrong, is that correct?
Hi @sposvc ,
Please check if the following workaround will work for you.
In my scenario, I am going to check if certain user exists in a group, if not, create user using Azure AD action, delay 1 minute to add the user to the group.
Further, there is a similar request on Flow Ideas Forum about Assign Office 365 License in Flow, please check and vote it at here:
Unfortunately, I am unable to use that workaround for a couple of reasons - first, we haven't implemented any licensing groups in our organization and it would take quite some time to move forward with such a change and second, the users who potentially wouldn't have a license would probably (but not always) be assigned an F1 license which is apparently not available with group licensing. What we'd like to do is check for a license, if the user doesn't have a license, our IT group would be emailed. Users who do have a license would be added to the Team. Is there any other way of doing this? Please let me know and I appreciate all suggestions!
Hi @sposvc ,
Thanks for updating.
I am afraid that there is no direct action would be used to achieve your scenario.
You may consider running PowerShell. Here is a blog on run any PnP-PowerShell in One Azure Function from Microsoft flow for your reference:
Hope this doc on view licensed and unlicensed users with Office 365 PowerShell will be helpful:
Three Super User rank tiers have been launched!
Features releasing from October 2020 through March 2021
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!