The flow consists of the following steps

  1. Trigger the Flow

    • The flow begins with a manual trigger, where the user provides an email address as input (txtEmailID).
  2. Initialize a Variable

    • The input email address is stored in a string variable (varEmailId) for reuse in subsequent actions.
  3. Get User Details

    • The Get user action of Microsoft Entra is used to fetch user details based on the provided email address, which is used as the User ID or Principal Name.
  4. Check if the User Exists

    • A condition checks whether the output from the Get user action is empty. This determines if the user exists in the tenant.
  5. Compose Actions for Both Outcomes

    • If Yes (User Exists): A Compose action is used to display user details like ID and Display Name.
    • If No (User Does Not Exist): Another Compose action handles scenarios where the user is not found, providing a structured response.

Manually trigger

Condition Logic

The condition leverages the empty expression to determine whether the user exists. Here's the key expression used in the condition:

Expression: outputs('Get_user')?['body'] is not equal to null

Use Case Scenarios

This flow can be adapted for various use cases:

Tips for Implementation

Note. The Microsoft Entra connector in Power Automate is a premium connector, which requires a premium license. Ensure you have the appropriate Power Automate plan to use this connector.

Conclusion

This flow demonstrates the simplicity and efficiency of combining Power Automate with Microsoft Entra to check user existence. With minimal configuration, you can leverage this solution to automate identity management tasks in your organization.

Happy automating!