Syncing Drupal Roles from CiviCRM Smart Groups
You could in a custom module, implement hook_user_login()

Then you could make an API call to get the contact id for the user...

Then you can do an API lookup to see if the contact is in the group (In this example I have a smart group with id 6. Then if the contact is in the group, and the user account doesn't have the role, add it....if the contact is not in the group and has the role, then remove the role. Easy peasy

function YOURMODULE_user_login(&amp;$edit, $account){
  civicrm_initialize();

  $result = civicrm_api3('UFMatch', 'get', [
    'sequential' =&gt; 1,
    'uf_id'      =&gt; $account-&gt;uid,
  ]);

  if ($result['count']) {
    $contact_id = $result['values'][0]['contact_id'];
  }

  // replace 2 with the rid of the role Associate
  $rid = 2;
  if (!empty($contact_id)) {
    $contact_result = civicrm_api3('Contact', 'get', [
      'sequential' =&gt; 1,
      'group'      =&gt; 6, // replace with your smart group, group id
      'id'         =&gt; $contact_id,
    ]);

    if ($contact_result['count']) {
      if (!user_has_role($rid, $account)) {
        $account-&gt;roles[$rid] = 'Associate';
        user_save($account);
      }
    }
    else {
      if (user_has_role($rid, $account)) {
        unset($account-&gt;roles[$rid]);
        user_save($account);
      }
    }
  }
}