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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Desktop flow Trigger w...
Power Automate
Unanswered

Desktop flow Trigger when user logs off its session or windows

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi everyone, 

 

I am trying to build a flow that logs in some data in excel when user log out his session or log off windows 10. I cannot figure out what process/item  should be  used as trigger for this flow. i have tried quser and logoff (processes) but it does not invoke this flow. Any idea how to do this?

I have the same question (0)
  • eric-cheng Profile Picture
    5,171 on at

    Hi @Anonymous ,

     

    Reading the Microsoft documentation here


    "To run an attended desktop flow, you need to have an active Windows user session that matches the name of the user configured for your connection. The session must not be locked."

     

    You also really only have two ways to trigger a PAD flow which is manually from PAD or from a cloud flow.

     

    You could technically trigger an API call to a cloud flow to trigger a PAD flow but there are many challenges and not ideal.  Getting the logoff event and actioning all this will also be difficult unless you are an admin and can apply a group policy.  Read this and this for more info.

     

    --------------------------------------------------------------------------
    If I have answered your question, please mark my post as a solution
    If you have found my response helpful, please give it a thumbs up

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks

     

    I will g through these links. I have created a desktop flow and the trigger for this flow is 

     

    nasidiqi_0-1626280176485.png

     

    What is understand is that it should run automatically when user logs on but i have to click the flow button. How can i make it to run automatically when a user logs in ?

  • Daniel_Pa Profile Picture
    244 on at

    Hi nasidiqi

     

    I believe you might have misunderstood what a trigger is.

    Triggers are used in Power Automate (the online workflow engine), where they specify actions that trigger the execution of a flow (either a local PAD flow, like the one you are designing or an online flow in PA).

    What you have shown in your screenshot is an action in a workflow, not a trigger.

     

    You could setup a flow, which is run continuously and waits for certain conditions to be fulfilled, before it starts executing actions corresponding to the interactions you want it to make. (I'm not sure if this is possible and what limitations might affect continuously running workflows.)

     

    Could you perhaps try and explain more about your process, what you want to achieve and why it has to be done the way are trying? Perhaps your goal can be reached in another way.

  • eric-cheng Profile Picture
    5,171 on at

    Hi @Anonymous ,

     

    There are 2 main types of triggers for a PAD flow:

     

    1) Manually pushing a button and triggering it via PAD

    2) Triggering it from a cloud flow

     

    The logon scenario would be the same as my previous past for logoff except there is a Task Scheduler trigger for user log on.  You will still need some sort of custom development to trigger to call as HTTP cloud flow endpoint.

     

    --------------------------------------------------------------------------
    If I have answered your question, please mark my post as a solution
    If you have found my response helpful, please give it a thumbs up

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 840

#2
Valantis Profile Picture

Valantis 661

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard