##### SUMMARY
See https://github.com/ansible/ansible/blob/88d8cf8197c53edd3bcdcd21429eb4c2bfbf0f6a/lib/ansible/module_utils/basic.py#L699-L706

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
lib/ansible/module_utils/basic.py

##### ANSIBLE VERSION
```paste below
2.9
devel
```

pass
class AzureRMAuth(object):
    def __init__(self, auth_source='auto', profile=None, subscription_id=None, client_id=None, secret=None,
                 tenant=None, ad_user=None, password=None, cloud_environment='AzureCloud', cert_validation_mode='validate',
                 api_profile='latest', adfs_authority_url=None, fail_impl=None, **kwargs):
        if fail_impl:
            self._fail_impl = fail_impl
        else:
            self._fail_impl = self._default_fail_impl
        self._cloud_environment = None
        self._adfs_authority_url = None
        
        self.credentials = self._get_credentials(
            dict(auth_source=auth_source, profile=profile, subscription_id=subscription_id, client_id=client_id, secret=secret,
                 tenant=tenant, ad_user=ad_user, password=password, cloud_environment=cloud_environment,
                 cert_validation_mode=cert_validation_mode, api_profile=api_profile, adfs_authority_url=adfs_authority_url))
        if not self.credentials:
            if HAS_AZURE_CLI_CORE:
                self.fail("Failed to get credentials. Either pass as parameters, set environment variables, "
                          "define a profile in ~/.azure/credentials, or log in with Azure CLI (`az login`).")
            else:
                self.fail("Failed to get credentials. Either pass as parameters, set environment variables, "
                          "define a profile in ~/.azure/credentials, or install Azure CLI and log in (`az login`).")
        
        self._cert_validation_mode = cert_validation_mode or self.credentials.get('cert_validation_mode') or \
            os.environ.get('AZURE_CERT_VALIDATION_MODE') or 'validate'
        if self._cert_validation_mode not in ['validate', 'ignore']:
            self.fail('invalid cert_validation_mode: {0}'.format(self._cert_validation_mode))
        
        raw_cloud_env = self.credentials.get('cloud_environment')