I have an Azure Function that uses prod and staging Deployment Slots. I was able to delete some Function Keys from the prod slot, but when I try to delete the same Function Keys in the staging slot, I get the error "Failed to delete ".
The same issue is now occurring when I want to create a new Function Key.
I tried stopping the function, still no go.
How do I delete a Function Key for a Function using a Deployment Slot?



2 Slots of my function App contains 2 function keys each (1 default created key and 1 custom function key created manually in both the slots with same key-value):
Production Slot:
Staging Slot:
Deleting the Function Keys
From Prod Slot:
From Staging slot:
For the above scenario, the traffic of prod slot is 100% and Staging slot is 0% in the Deployment Slots.
I think the cause might be your staging slot is having any traffic coming from staging slot functions. If yes, make the traffic to
0%and try deleting your function keys.