A highly pathogenic avian influenza was detected in a noncommercial backyard flock of birds on Long Island, authorities confirmed Saturday.