Reassigning Microsoft Fabric Capacities in Bulk: Don’t Let an Expiring Trial Catch You by Surprise
Capacity Management
Table of Contents
Avoid Losing Fabric Items When a Trial Expires: Bulk Reassign Workspaces Between Capacities Using Fabric CLI
With the summer holiday season approaching, many organizations are running Microsoft Fabric workloads on trial capacities that were originally created for proof-of-concepts, workshops, or development activities. What often gets overlooked is that Fabric trial capacities eventually expire, and when they do, the consequences can be significant. According to Microsoft Fabric community guidance, you have only seven days after trial expiration to reassign your workspaces to an active capacity. After that retention period, non-Power BI Fabric items are removed according to the retention policy.
For a tenant with a handful of workspaces, manually reassigning capacities might be manageable. But what if you need to migrate dozens or even hundreds of workspaces from Capacity A to Capacity B?
Fortunately, there is an easy way to automate this process.
Why Reassign Capacities?
There are several common scenarios:
- A Fabric Trial capacity is about to expire.
- You purchased a new Fabric capacity and want to move workloads.
- You're consolidating capacities to reduce costs.
- You're separating development, test, and production workloads.
- You're moving workspaces to a larger SKU due to increased usage.
Whatever the reason, workspace reassignment is a straightforward administrative task that can be automated through the Fabric CLI and Fabric APIs.
The Hidden Risk of Trial Capacities
Many organizations start their Fabric journey on a trial capacity. It works great for evaluations, hackathons, and pilot projects. However, when the trial expires, the clock starts ticking.
Microsoft states that after trial expiration, you have a seven-day window to save your Fabric content by assigning the affected workspaces to an active Fabric capacity. If you don't migrate the workspaces assigned to your Fabric trial capacity before your free Fabric trial capacity expires, the workspaces will be moved to Power BI with license mode Pro and you will not be able to use Fabric (non-Power BI) items. Fabric items not moved to a Power BI Premium or Fabric capacity within 7 days after your trial ends may be permanently deleted. If you have Power BI items, they will continue to exist in the workspace. Items that you created in other workspaces not assigned to your Fabric trial capacity will be unaffected.
I've seen customers develop:
- Lakehouses
- Notebooks
- Data Pipelines
- Dataflows Gen2
- Semantic Models
- Warehouse solutions
...only to discover during a holiday period that their trial is expiring.
My advice: don't wait until the last day.
Bulk Migration with Fabric CLI
Instead of opening every workspace manually, you can automate the entire process.
The approach is simple:
- Enumerate all Fabric workspaces.
- Identify the current capacity.
- Optionally filter specific workspaces.
- Assign them to the target capacity.
- Create a migration report.
- Helps you avoid manual workspace-by-workspace administration
tasks = []
filter_set = (
{w.lower() for w in filter_workspaces}
if filter_workspaces
else None
)
workspaces = get_workspaces()
for ws in workspaces["result"]["data"]:
workspace_name = ws.get("name", "").removesuffix(".Workspace")
capacity_name = ws.get("capacityName", "")
# Optional workspace filter
if filter_set and workspace_name.lower() not in filter_set:
continue
# Skip unassigned workspaces
if capacity_name == "N/A":
continue
if assign_capacity_to_all_fabric_workspaces:
if capacity_name != target_capacity:
print(f"Moving {workspace_name} from {capacity_name} to {target_capacity}" )
result = assign_capacity(workspace_name,target_capacity )
tasks.append({"Workspace": workspace_name,"Source Capacity": capacity_name,"Target Capacity": target_capacity,"Remarks": result})
else:
print(f"{workspace_name} no action needed, capacity already assigned")
tasks.append({"Workspace": workspace_name,"Source Capacity": capacity_name,"Target Capacity": target_capacity,"Remarks": "Capacity already assigned"})
else:
if capacity_name == source_capacity:
print(f"Moving {workspace_name} from {source_capacity} to {target_capacity}" )
result = assign_capacity(workspace_name,target_capacity )
tasks.append({"Workspace": workspace_name,"Source Capacity": capacity_name,"Target Capacity": target_capacity,"Remarks": result})
else:
print(f"{workspace_name} skipped current capacity: {capacity_name}" )
tasks.append({"Workspace": workspace_name,"Source Capacity": capacity_name,"Target Capacity": target_capacity,"Remarks": "Skipped - not on source capacity"})
Check out the script on GitHub and adapt it to your environment:
Check out my GitHub repository for the complete migration script.
Fabric_Tooling/NB_WORKSPACE_CHANGE_CAPACITY
Whether you're cleaning up trial capacities, consolidating environments or moving to a larger Fabric SKU, automation can save a lot of time and reduce the risk of missing a critical workspace.
Why Automation Matters
I've noticed many Fabric environments that started as small experiments and quickly grew into business-critical platforms.
A workspace that started as:
"Let's just test Fabric for a few days"
Can suddenly contain:
- Production pipelines
- Business reporting
- Data engineering workloads
- Governance processes
When a trial capacity approaches expiration, manually managing dozens of workspaces becomes error-prone.
Automating the migration process provides:
- Repeatability
- Traceability
- Faster execution
- Lower risk
- Full reporting
Final Thoughts
If you're using Microsoft Fabric Trial capacities today, take a few minutes to check:
- Which workspaces are assigned to the trial.
- When the capacity expires.
- Whether a long holiday period overlaps with the expiration date.
Remember that Microsoft provides only a limited grace period after trial expiration to save your Fabric items by moving the workspace to an active capacity.
The good news is that moving workspaces from Capacity A to Capacity B can be fully automated. A simple Fabric CLI or REST API script can handle the migration in minutes and help you avoid an unpleasant surprise when you return from vacation.
Tip: Even if you're not currently running a trial, keeping an automated capacity migration script in your Fabric toolbox is a great operational practice. Sooner or later, you'll need it for a capacity upgrade, consolidation, or tenant migration.



