Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
To build Power Automate flows that are secure and easy to manage, it's important to keep their configuration generic. Generic configuration means avoiding hard-coded values and using environment variables and service principals instead. By doing so, you can improve security, simplify management, and make it easier to share flows across different environments.
Environment variables
When you export a Power Automate flow in a solution or as a zip package, someone can open the flow definition and expose hard-coded values like passwords or secrets. To prevent exposing sensitive information, store those values in environment variables instead of hard-coding them in your flows. Environment variables also make it easier to change the values without modifying the flow itself.
Service principals
A service principal is a nonhuman security identity that represents an application or service that can own and manage resources in Microsoft Azure and Power Platform. Service principals allow applications and services to access resources securely without requiring user credentials. They're particularly useful for automating tasks that require authentication to an application or service. Whenever possible, use service principals for flow ownership and creating connections to enhance security and simplify management. Learn more in Support for service principal owned flows.
To use a service principal in Power Platform, first create a service principal application user in the portal or through the API. An application user can have connections shared with them and can own resources such as flows.