Like me if you encounter this error while trying to backup SQL server 2017 database on Azure, then there are two possible reasons for this.
I will underline the reasons and also provide the fix
- You are using SQL server 2017 and are running CU15, then this error is bound to come every time you try to backup as this is a bug in CU15 and was corrected in a KB pushed later by Micorosft or other next course would be to update to latest CU which right now is CU19
- Even though you are on latest CU but are still encountering this error then next course of action would be check your backup preference for the AG group and mark your preference as Either primary or Secondary instead of any replica and Voila you are back in the game and backup sets are working wonderfully again.
Let me know in comments if you think there are other ways to fix this error