def METHOD_NAME(api_client, settings, login_using_ad):
    """Using AD authentication forces the User.is_external to False."""
    user = UserFactory()
    detail_url = versioned_reverse("user-detail", kwargs={"pk": user.uuid})
    ad_method = "helsinkiazuread"
    settings.NON_EXTERNAL_AUTHENTICATION_METHODS = [ad_method]
    if login_using_ad:
        auth_method = ad_method
    else:
        auth_method = "non-ad_method"
    auth_header = get_api_token_for_user_with_scopes(
        user.uuid, [api_token_auth_settings.API_SCOPE_PREFIX], amr=auth_method
    )
    api_client.credentials(HTTP_AUTHORIZATION=auth_header)
    response = api_client.get(detail_url, format="json")
    assert response.status_code == status.HTTP_200_OK, str(response.content)
    assert response.data["is_external"] != login_using_ad