@Annelotte Mons Thanks for confirmation.
Can you please update the listSecrets to listkeys in your ARM template and see if it helps you to resolve the issue.
I see a previous discussion here where the team recommended to use ListKeys instead of ListSecrets as you shouldn't be used anymore.
Let me know if you still face the issue after leveraging the listkeys method in your ARM template.