Checking SQL AlwaysOn backup target with fn_hadr_backup_is_preferred_replica, different answers with different permissions
You have to GRANT the user view server state and  view definition on availability group.