get all posts associated with a custom taxonomy

You can do what you want with the tax_query parameter since version 4.1, use EXISTS as the operator parameter in your tax query.

$args = array(
    'post_type' => 'post',
    'tax_query' => array(
        array(
            'taxonomy' => 'mytax',
            'operator' => 'EXISTS'
        ),
    ),
);
$query = new WP_Query( $args );