def get_client_from_json_dict(client_class, config_dict, **kwargs):
is_graphrbac = client_class.__name__ == '<STR_LIT>'<EOL>parameters = {<EOL>'<STR_LIT>': config_dict.get('<STR_LIT>'),<EOL>'<STR_LIT>': config_dict.get('<STR_LIT>'),<EOL>'<STR_LIT>': config_dict.get('<STR_LIT>')  <EOL>}<EOL>if is_graphrbac:<EOL><INDENT>parameters['<STR_LIT>'] = config_dict['<STR_LIT>']<EOL><DEDENT>if '<STR_LIT>' not in kwargs:<EOL><INDENT>if is_graphrbac:<EOL><INDENT>resource = config_dict['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>if "<STR_LIT>" not in config_dict and '<STR_LIT>' not in config_dict:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>resource = config_dict.get('<STR_LIT>', config_dict['<STR_LIT>'])<EOL><DEDENT>authority_url = config_dict['<STR_LIT>']<EOL>is_adfs = bool(re.match('<STR_LIT>', authority_url, re.I))<EOL>if is_adfs:<EOL><INDENT>authority_url = authority_url.rstrip('<STR_LIT:/>')  <EOL><DEDENT>else:<EOL><INDENT>authority_url = authority_url + '<STR_LIT:/>' + config_dict['<STR_LIT>']<EOL><DEDENT>context = adal.AuthenticationContext(<EOL>authority_url,<EOL>api_version=None,<EOL>validate_authority=not is_adfs<EOL>)<EOL>parameters['<STR_LIT>'] = AdalAuthentication(<EOL>context.acquire_token_with_client_credentials,<EOL>resource,<EOL>config_dict['<STR_LIT>'],<EOL>config_dict['<STR_LIT>']<EOL>)<EOL><DEDENT>parameters.update(kwargs)<EOL>return _instantiate_client(client_class, **parameters)<EOL>
Return a SDK client initialized with a JSON auth dict.

    The easiest way to obtain this content is to call the following CLI commands:

    .. code:: bash

        az ad sp create-for-rbac --sdk-auth

    This method will fill automatically the following client parameters:
    - credentials
    - subscription_id
    - base_url
    - tenant_id

    Parameters provided in kwargs will override parameters and be passed directly to the client.

    :Example:

    .. code:: python

        from azure.common.client_factory import get_client_from_auth_file
        from azure.mgmt.compute import ComputeManagementClient
        config_dict = {
            "clientId": "ad735158-65ca-11e7-ba4d-ecb1d756380e",
            "clientSecret": "b70bb224-65ca-11e7-810c-ecb1d756380e",
            "subscriptionId": "bfc42d3a-65ca-11e7-95cf-ecb1d756380e",
            "tenantId": "c81da1d8-65ca-11e7-b1d1-ecb1d756380e",
            "activeDirectoryEndpointUrl": "https://login.microsoftonline.com",
            "resourceManagerEndpointUrl": "https://management.azure.com/",
            "activeDirectoryGraphResourceId": "https://graph.windows.net/",
            "sqlManagementEndpointUrl": "https://management.core.windows.net:8443/",
            "galleryEndpointUrl": "https://gallery.azure.com/",
            "managementEndpointUrl": "https://management.core.windows.net/"
        }
        client = get_client_from_json_dict(ComputeManagementClient, config_dict)

    .. versionadded:: 1.1.7

    :param client_class: A SDK client class
    :param dict config_dict: A config dict.
    :return: An instantiated client