Forum Discussion
How to Get Environment Group via flow for Refresh a dataflow -31c688f59-us
- 1 year ago
Hi srokaja ,
Yeah this one can be a bit tricky. The groupIdForRefreshDataflows you're referring to is actually a composite value that includes the environment ID and a region-specific suffix. It's not exactly the same as workspace ID + region, though it might look like it.
If you're trying to get this programmatically inside a flow, here's what usually works:
- Use the List Environments action from the Power Platform connector to get the environment ID.
- Then, depending on your region, the suffix (like -31c688f59-us) is usually tied to the geo where the environment is hosted. Unfortunately, there's no direct API that gives you the full groupIdForRefreshDataflows in one go.
- One workaround is to manually trigger a refresh once and inspect the run history to capture the full value. Then you can reuse it in future flows or store it in a variable/config.
Also, make sure you're using the correct connector (shared_dataflows_1 looks fine) and that the environment has the right permissions set for the flow to trigger the refresh.
Hope this helps a bit.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
Thank you for the feedback.
I performed something similar and already was dynamically getting EnvID via workflow()?['tags/environmentName'] then had to run flow manually the first time to get -{Geo} and -{suffix} which I have in an environment variable "-31c688f59" and suffix "-us". I was trying to do my duediligendce to make sure I didn't hardcode values in case something could change with hosting in the future. Thank you