Hi Ahmed,
followed up with our team and they have sent the following:
They suspect the following 2 lines will get you the outcome you are aiming for:
$userUtils = \Drupal::service('ibm_apim.user_utils');
$org = $userUtils->getCurrentConsumerOrg();
As it will return an object with the attributes of the currently selected org - e.g $org['url'] would give the url of that org.
let me know if this works!
------------------------------
Gabriel Marte Blanco
Austin TX
------------------------------