web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / MS Flow - Check if use...
Power Automate
Unanswered

MS Flow - Check if user has Office 365 license

(0) ShareShare
ReportReport
Posted on by 11

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?

Categories:
I have the same question (0)
  • ScottShearer Profile Picture
    25,270 Most Valuable Professional on at

    @sposvc 

    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.

     

  • sposvc Profile Picture
    11 on at

    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?
    Flow1.png

  • v-yamao-msft Profile Picture
    on at

    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.

    1.PNG

     

    Further, there is a similar request on Flow Ideas Forum about Assign Office 365 License in Flow, please check and vote it at here:

    https://powerusers.microsoft.com/t5/Flow-Ideas/Assign-Office-365-License-in-Flow-Fully-Automate-Onboarding/idi-p/132797

     

    Best regards,

    Mabel

     

  • sposvc Profile Picture
    11 on at

    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!

  • v-yamao-msft Profile Picture
    on at

    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:

    http://johnliu.net/blog/2018/4/run-any-pnp-powershell-in-one-azurefunction-from-microsoft-flow

     

    Hope this doc on view licensed and unlicensed users with Office 365 PowerShell will be helpful:

    https://docs.microsoft.com/en-us/office365/enterprise/powershell/view-licensed-and-unlicensed-users-with-office-365-powershell

     

     

    Best regards,

    Mabel

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard