I created a flow that add a user to a security group. Based on group membership it adds a O365 license to the user (E3 or F1).
The issue is, if there are no licenses available, I need it to error and send an email to the Admin to buy additional licenses.
How would I do that?
Solved! Go to Solution.
Hi @anon1m0us ,
Sorry for there is no any way to check if there is a enough licenses in Microsoft flow currently.
Best Regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @anon1m0us ,
If you are getting an error on "Add user to E3 group" then you can configure run after action on error and send the email.
If you are not getting an error you can check user membership and if it does not changed to E3 your send email
Regards,
Adding to a group is not an issue. In Azure AD I assigned licenses to the group. Any user that gets added to the group gets a license. The issue I have is how do I check if I have enough licenses? If I used up all my licenses, Flow will still complete successfully but Azure won't add another license since there are none available.
I need to check available licenses prior to adding a user in a group.
Isaac
Hi @anon1m0us ,
Sorry for there is no any way to check if there is a enough licenses in Microsoft flow currently.
Best Regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Is there a way to just order a license?
Hi @anon1m0us ,
Sorry for there is no any way to achieve it with Microsoft flow.
Best regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You could do it using this approach:
https://janbakker.tech/use-power-automate-or-logic-apps-to-keep-an-eye-on-your-licenses/
That gives you a way of checking license status using MS Graph. You could then use the calculations used in the link to test for available licenses, before deploying, and the sending email if you lack licenses.
User | Count |
---|---|
88 | |
39 | |
23 | |
20 | |
16 |
User | Count |
---|---|
128 | |
49 | |
46 | |
34 | |
25 |