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 / Flow that detect when ...
Power Automate
Unanswered

Flow that detect when user-account is created or deleted?

(0) ShareShare
ReportReport
Posted on by 1,097

Hey

 

I have a need of building a power automate flow that detect when a new user is created or deleted.

I can not find any connections for this tho (i am global admin).

 

Is there a way today to do this with flow?

I want to build a flow that informs people when users are created and deleted so we can keep track on new people and remove things when ppl are removed.

 

 

Categories:
I have the same question (0)
  • ChrisPiasecki Profile Picture
    6,422 Most Valuable Professional on at

    Hi @Oskarkuus,

     

    You can achieve this using a Webhook trigger (When a HTTP Request is Received). You can subscribe to Microsoft Graph API  created and deleted change events for a User. The article below does a good job of explaining how to subscribe to Graph API events, then using Azure Logic Apps (Power Automate is Logic Apps under the hood with some minor differences).

     

    https://gotoguy.blog/2020/07/12/subscribing-to-teams-presence-with-graph-api-using-power-platform/

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

  • Oskarkuus Profile Picture
    1,097 on at

    Thanks. That looks interesting. But i think the webhook command needs a premium license.

     

    I came up with an idea to fill a sharepoint list with all users and then compare that list to all useraccounts once every hour. That would give me new accounts and deleted.

    I think.... 

     

     

  • ChrisPiasecki Profile Picture
    6,422 Most Valuable Professional on at

    Hi @Oskarkuus,

     

    Yes you could do something like a full sync every hour, but keep in mind this method will have challenges scaling, especially at a high volume of users. Depending on the actions performed in your flow, you could run into throttling limits if not careful, so keep that in mind while building/testing.

     

    Webhooks are often more efficient than constant polling and can receive the information in near real time, but if premium connectors are a dealbreaker, then you may have to look at your alternate method.

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

  • Oskarkuus Profile Picture
    1,097 on at

    What throttling limits are there?

    I hav 3500 users.

     

    Wont it work with pagination and raising throttling value to 2000?

     

  • ChrisPiasecki Profile Picture
    6,422 Most Valuable Professional on at

    Hi @Oskarkuus,

     

    The Power Platform throttling limits are documented here. Note that for flow each action counts as a request, so if you're iterating through large collections, you could eat up daily API limits.

     

    https://docs.microsoft.com/en-us/power-platform/admin/api-request-limits-allocations#request-limits-based-on-user-licenses

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

  • Oskarkuus Profile Picture
    1,097 on at

    What, do you mean my 2000 api limit eats up if i do a get items on a sp list and then do a for each loop? Will that be one api call per for each pass?

     

    Still dont really understand pagination. Will i be able to get all items if there are more than 2000

  • ChrisPiasecki Profile Picture
    6,422 Most Valuable Professional on at

    Hi @Oskarkuus,

     

    The get items request will take up a request (and another if fetching more via paging). To be honest I'm not sure if it's a full 1 request per every single action or if some actions are more expensive than others based on memory/compute, the documentation isn't clear on that, and I haven't ran into throttling limits yet myself or tested it (I have a Dynamics plan though). 

     

    With Pagination you should be able to retrieve more records yes, it just means an extra request is needed to fetch the next batch.

     

    I think your best bet is to try your method out first and see if works without any throttling issues, then look at alternatives like the one I suggested.

     

    Hope this helps. 

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

  • Oskarkuus Profile Picture
    1,097 on at

    Thank you.

     

    Just one last question  🙂

    If for example one request of get items is one request.

    Then if i do one request, load 2000 people and for example, then run "send one mail to each person". Will each mail be one request. So if i would do so, that would mean a total of 2001 requests that specific run of that flow and i would be over my current limit.

     

    Understand that it might not be fully transparent and all info is not documented... but whats your guess

  • ChrisPiasecki Profile Picture
    6,422 Most Valuable Professional on at

    Hi @Oskarkuus,

     

    That sounds about right. Best way to confirm is test it using a test account if you have one so you don't impact existing flows that you own.

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

  • Oskarkuus Profile Picture
    1,097 on at

    How do u mean test? Test do 2001 mails and see if i cap out? How do i see how many are left? 

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