Using Sprocket Actions in Non-Default Power Automate Environments
By default, Sprocket Actions uses the Power Automate environment ID to identify your tenant. This works automatically when your flows run in the Default environment. However, if you move your Power Automate solution to a different environment (e.g. Production, Development, or a custom environment), the environment ID changes and no longer maps to your Azure AD Tenant ID.
This guide explains how to configure the Sprocket Actions connector to work in any Power Automate environment using a connector policy.
Why Does This Happen?
Power Automate sends an x-ms-environment-id header with every connector request. In the Default environment, this header contains your Azure AD Tenant ID prefixed with Default-. Sprocket Actions strips that prefix to identify your tenant.
When you move your solution to a non-Default environment, the environment ID changes to a different value that no longer contains your Tenant ID. This causes Sprocket Actions to fail validation.
Solution: Add a Connector Policy
You can add a policy to the Sprocket Actions connector that overrides the x-ms-environment-id header with your Azure AD Tenant ID. This is configured once at the connector level and applies to all actions in all flows using that connector.
Step 1: Find Your Azure AD Tenant ID
You'll need your Azure AD Tenant ID (a GUID in the format 00000000-0000-0000-0000-000000000000).
Option A: Azure Portal
- Navigate to portal.azure.com
- Search for and open Microsoft Entra ID (formerly Azure Active Directory)
- On the Overview page, find Tenant ID
- Copy the GUID value
Option B: Microsoft 365 Admin Center
- Navigate to admin.microsoft.com
- Go to Settings > Org settings > Organization profile
- Find Organization ID - this is your Tenant ID
Step 2: Open the Sprocket Actions Connector Settings
- Go to make.powerautomate.com
- Ensure you are in the correct environment (select from the environment picker in the top right)
- In the left navigation, click More and then select Discover all
- Under the Data section, select Custom connectors
- Find Sprocket Actions in the list
- Click the pencil icon (Edit) to open the connector settings
Step 3: Add a Connector Policy
- In the connector editor, navigate to the Definition tab on the top
- Scroll down to the Policies section
- Click + New policy to add a new policy
- Configure the policy with the following settings:
| Setting | Value |
|---|---|
| Name | Set Tenant ID |
| Template | Set HTTP header |
| Header name | x-ms-environment-id |
| Header value | Default-{your-tenant-id} |
| Action if header exists | override |
| Run policy on | Request |
Make sure to prefix your Tenant ID with Default-. For example, if your Tenant ID is 550e8400-e29b-41d4-a716-446655440000, the header value should be Default-550e8400-e29b-41d4-a716-446655440000.
- Click Update connector to save the changes
Step 4: Test Your Flows
- Open a flow that uses a Sprocket Actions action
- Run a test to confirm the action completes successfully
- If the flow was previously failing due to the environment change, it should now work
FAQs
Will this affect flows in the Default environment?
If you add this policy to the connector in a non-Default environment, it only affects that environment's connector. Each environment has its own connector configuration. Flows in the Default environment are unaffected.
Do I need to update my existing flows?
No. The policy applies at the connector level and automatically overrides the header for all flows that use the Sprocket Actions connector in that environment. No changes to individual flows are required.
What if I move my solution to another environment later?
You will need to repeat these steps for the new environment. Each environment has its own connector configuration and policies.
Where do I find my Tenant ID if I don't have access to the Azure Portal?
Ask your IT administrator, or use PowerShell:
Connect-AzureAD
(Get-AzureADTenantDetail).ObjectId
I followed these steps but my flows are still failing. What should I do?
- Double-check that the header value is prefixed with
Default-followed by your Tenant ID - Verify the policy action is set to override (not append)
- Ensure you clicked Update connector after adding the policy
- Confirm your Sprocket subscription is active at app.sprocket365.com
- If the issue persists, contact support at [email protected]