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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

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
September Fabric Update Carousel

Fabric Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.