Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
JAnder
Helper I
Helper I

Replication Issue With Azure SQL Mirror - With Service Principal Owner

I have setup an Azure SQL mirror in a workspace using a service principal and the fabric REST API.

 

  • Service Principal in an Entra group, the group has a login on the server and a user on the database being mirrored. It has these permissions: ALTER ANY EXTERNAL MIRROR, CONNECT, SELECT, VIEW PERFORMANCE DEFINITION
  • The Connection is created to use the principal for authentication but also created by the principal, so it is the owner.
  • The mirror is created by the principal also and uses the connection.
  • The principal has admin level access on the workspace

 

When I view the mirror on the workspace and choose "Start replication" it then switches to running. However the tables never replicate.  If I then choose to "Configure Replication" I get a permissions error as the connection is owned by the service principal. 

 

If I run `EXEC sp_help_change_feed;` on the source database, I can see everything is at State 1 (pending) while a manually setup (not using the API) mirror on another workspace generates state 4 results.

 

There is the issue that we cannot see the connection or configure replication as its owned by the principal. I am not sure if we can set that as shared using the API?  But the main issue is the tables are not replicating even though the mirror shows as running.  

 

Has anyone seen these issues?

 

 

 

 

 

 

1 ACCEPTED SOLUTION
JAnder
Helper I
Helper I

For anyone reading this in the future, when the mirror is created by the API, you need to set the SAMI permissions either by going to the mirror in the portal and choosing share or by using an API call. I had not done that.

View solution in original post

1 REPLY 1
JAnder
Helper I
Helper I

For anyone reading this in the future, when the mirror is created by the API, you need to set the SAMI permissions either by going to the mirror in the portal and choosing share or by using an API call. I had not done that.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Fabric Update Carousel

Fabric Monthly Update - September 2025

Check out the September 2025 Fabric update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.