code: def get_graph_token_from_msi():
      '''get a Microsoft Graph access token using Azure Cloud Shell's MSI_ENDPOINT.
  
          Notes: 
          The auth token returned by this function is not an Azure auth token. Use it for querying
          the Microsoft Graph API.
          This function only works in an Azure cloud shell or virtual machine.
  
      Returns:
          A Microsoft Graph authentication token string.
      '''
      if 'ACC_CLOUD' in os.environ and 'MSI_ENDPOINT' in os.environ:
          endpoint = os.environ['MSI_ENDPOINT']
      else:
          return None
      
      headers = {'Metadata': 'true'}
      body = {"resource": 'https://' + GRAPH_RESOURCE_HOST + '/'}
      ret = requests.post(endpoint, headers=headers, data=body)
      return ret.json()['access_token'f get_graph_token_from_msi():
      '''get a Microsoft Graph access token using Azure Cloud Shell's MSI_ENDPOINT.
  
          Notes: 
          The auth token returned by this function is not an Azure auth token. Use it for querying
          the Microsoft Graph API.
          This function only works in an Azure cloud shell or virtual machine.
  
      Returns:
          A Microsoft Graph authentication token string.
      '''
      if 'ACC_CLOUD' in os.environ and 'MSI_ENDPOINT' in os.environ:
          endpoint = os.environ['MSI_ENDPOINT']
      else:
          return None
      
      headers = {'Metadata': 'true'}
      body = {"resource": 'https://' + GRAPH_RESOURCE_HOST + '/'}
      ret = requests.post(endpoint, headers=headers, data=body)
      return ret.json()['access_token']
docs: get a Microsoft Graph access token using Azure Cloud Shell's MSI_ENDPOINT.
  
          Notes: 
          The auth token returned by this function is not an Azure auth token. Use it for querying
          the Microsoft Graph API.
          This function only works in an Azure cloud shell or virtual machine.
  
      Returns:
          A Microsoft Graph authentication token string.