When you configure Function in the Action Group, Azure would take care of calling the Function with required key automatically when the action group is triggered from an alert. For example, below is my sample alert execution which triggered an action group calling a Function protected at Admin level. But do let me know if you are facing any issue in your case.