Object Replication
Policies and rules · prerequisites · copy scope · cross-tenant · status and troubleshooting
By the tools4free.dev team · Last reviewed November 13, 2026
Practice questions for this topic →
What it does
- Copies block blobs asynchronously from a source account to a destination account. Supported on general-purpose v2 and premium block blob accounts.
- Not supported: append blobs, page blobs, accounts with a hierarchical namespace, and blobs uploaded through Data Lake Storage APIs.
- Versions (current and previous) are replicated and get new version IDs at the destination. Snapshots aren't replicated.
- Works across hot, cool and cold tiers, and the tiers can differ. Changing the source tier doesn't change the destination tier.
- There is no cost to configure it. Transactions, egress and change feed reads are billed.
- It isn't the same as GRS. Object replication works per container, can filter, supports block blobs only, and you choose the destination account.
Prerequisites and permissions
| Requirement | Source account | Destination account |
|---|---|---|
| Change feed | Enabled | Not required |
| Blob versioning | Enabled | Enabled |
| Containers | Must exist before you create a rule | Must exist before you create a rule |
- While a policy exists you can't disable versioning. Delete the policies first.
- To configure a policy you need the Contributor role on the storage account or higher. Enabling versioning or change feed needs
Microsoft.Storage/storageAccounts/blobServices/write. - After the policy is in place, writes to the destination container fail with 409 Conflict. Reads and deletes are allowed. To write, delete the rule or policy.
Policies and rules
- Create the policy on the destination account first. Use policy ID
defaultto let Azure generate the policy and rule IDs. Then apply the same policy to the source account with the same policy ID and rule IDs. The portal does both when you configure it on the source. - One policy per source and destination pair. A source can replicate to at most 2 destination accounts. An account can be the destination of at most 2 policies.
- Up to 1,000 rules per policy. Each rule maps one source container to one destination container, and each container is in only one rule. The portal allows 10 container pairs; use a JSON upload for more.
- Filters: prefix match (up to 5 prefixes in the portal). Wildcards aren't supported.
- Copy scope. Default: only blobs created after the rule. Options: all existing blobs plus new ones (min creation time
1601-01-01T00:00:00Z), or a custom date and time. - Priority replication targets 99.0% of objects within 15 minutes (same continent) and is SLA-backed. Metrics show operations pending and bytes pending.
| Limit | Value |
|---|---|
| Rules per policy | 1,000 |
| Destinations per source / policies per destination | 2 / 2 |
| Container pairs in the portal | 10 |
| Prefix filters in the portal | 5 |
| Container deletion lag | Up to 30 seconds |
Cross-tenant replication
- For accounts created on or after Dec 15, 2023, Allow cross-tenant replication is off by default.
- With it disallowed, both accounts must be in the same tenant and the policy must use full resource IDs, not just account names. You can't set it to false while cross-tenant policies exist.
- No access to the source account (for example another tenant)? Create the policy on the destination, download the rules JSON, and give it to the source owner. They use Upload replication rules. Uploading JSON in the portal doesn't create the source policy by itself.
One Learn page labels the cross-tenant setting as preview, while the portal create page lists it as a normal option. Treat it as a current setting.
Status and troubleshooting
- Check a blob's Object replication status (Complete or Failed) in its properties. The property isn't filled in until the status is Complete or Failed.
- Failure causes: the policy is missing on the destination, the destination container was deleted or isn't in the policy, the source blob is encrypted with a customer-provided key, a blob is in the archive tier, or an immutability policy on the destination blocks updates or deletes.
- Replication fails if a blob (source or destination) moves to archive. Rehydrating it doesn't trigger replication.
- Customer-managed keys are supported. Customer-managed failover isn't supported for accounts in a policy.
- To remove replication, delete the policy on both accounts. Re-creating a policy on the same pair makes a new policy ID and a new relationship.
CLI and PowerShell
| Task | Azure CLI | PowerShell |
|---|---|---|
| Enable versioning and change feed (source) | az storage account blob-service-properties update --resource-group <rg> --account-name <src> --enable-versioning --enable-change-feed | Update-AzStorageBlobServiceProperty -ResourceGroupName <rg> -StorageAccountName <src> -EnableChangeFeed $true -IsVersioningEnabled $true |
| Enable versioning (destination) | az storage account blob-service-properties update --resource-group <rg> --account-name <dest> --enable-versioning | Update-AzStorageBlobServiceProperty ... -IsVersioningEnabled $true |
| Create the policy on the destination | az storage account or-policy create --account-name <dest> --resource-group <rg> --source-account <src> --destination-account <dest> --source-container <c1> --destination-container <c2> --min-creation-time '2021-09-01T00:00:00Z' --prefix-match a | Set-AzStorageObjectReplicationPolicy -ResourceGroupName <rg> -StorageAccountName <dest> -PolicyId default -SourceAccount <src> -Rule $rule1,$rule2 |
| Add a rule | az storage account or-policy rule add --account-name <dest> --resource-group <rg> --source-container <c> --destination-container <c> --policy-id <id> --prefix-match b | New-AzStorageObjectReplicationPolicyRule |
| Apply the policy to the source | az storage account or-policy show --account-name <dest> --policy-id <id> | az storage account or-policy create --account-name <src> --policy "@-" | Set-AzStorageObjectReplicationPolicy -ResourceGroupName <rg> -StorageAccountName <src> -InputObject $destPolicy |
| Check a blob's status | az storage blob show ... --query 'objectReplicationSourceProperties[].rules[].status' | $blob.BlobProperties.ObjectReplicationSourceProperties[0].Rules[0].ReplicationStatus |
| Delete a policy | az storage account or-policy delete --policy-id <id> --account-name <src|dest> --resource-group <rg> | Remove-AzStorageObjectReplicationPolicy -ResourceGroupName <rg> -StorageAccountName <acct> -PolicyId <id> |
| Order | Step |
|---|---|
| 1 | Enable versioning on both accounts and change feed on the source |
| 2 | Create the containers in both accounts |
| 3 | Create the policy on the destination (policy ID default) |
| 4 | Create the same policy on the source, using the returned policy ID |
Exam Tips
Tick each tip once you can answer it without looking.
“Prerequisites for object replication” → Versioning on source and destination, change feed on the source. Trap: change feed on the destination, or soft delete.
“Replicate existing blobs too” → Copy scope: all objects, chosen when you create the rule. Trap: the default copies only new blobs.
“Writing to the destination container returns 409” → The replication policy locks the destination: delete the rule or policy. Trap: a permissions problem.
“Replicate only blobs whose names start with logs/” → A prefix filter in the rule. Trap: wildcards aren't supported.
“Do append blobs and page blobs replicate?” → No: block blobs only. Trap: all blob types.
“Account has a hierarchical namespace” → Object replication isn't supported. Trap: it works with Data Lake Storage.
“Are snapshots replicated?” → No: versions are, snapshots aren't. Trap: assuming snapshots follow versions.
“Can't disable versioning on the source account” → An object replication policy exists: delete the policies first. Trap: a soft delete setting.
“Blob moved to archive in the source” → Replication fails for that blob, and rehydrating doesn't trigger it. Trap: replication resuming on its own.
“Status Failed; the source blob was uploaded with a customer-provided key” → That isn't supported. Trap: a Key Vault permissions problem.
“Role needed to configure a policy” → Contributor on the account(s). Trap: Storage Blob Data Contributor.
“Maximum destination accounts for one source” → 2. Trap: unlimited.
“Source is in another tenant and you have no access to it” → Create the policy on the destination, export the JSON, and the source owner applies it with the same policy ID. Trap: the portal configuring both sides automatically.
“Policy creation with account names only fails” → With cross-tenant replication disallowed, use full resource IDs. Trap: the tenants being unrelated.
“Order of creating a policy” → Destination account first, then the source with the same policy ID. Trap: starting on the source with a new ID.
“Change the source blob's tier to cool” → The destination blob's tier doesn't change.
Sources
Checked against Microsoft Learn on November 13, 2026.