title: Azure python SDK - list Service Principal permissions
body: <p>I am new to azure,
  I am trying to write a python script that lists (in json format) the &quot;attached policies&quot; (see what operations on which resource are allowed both deligated and application permissions) of a <strong>Service Principal</strong> (I have its ID)</p>
  <p>I looked in the documentation for <code>AuthorizationManagementClient</code> and tried</p>
  <pre><code>auth_management_client = AuthorizationManagementClient(
              credentials=credentials, subscription_id=subscription_id
          )
  role_assignments_objects=auth_management_client.role_assignments.list()
  for role_assignment in role_assignments_objects:
      print(role_assignment.description)
  </code></pre>
  <p>but I am getting  <code>'RoleAssignment' object has no attribute 'description'</code>
  and I can't figure out how to use this <strong><a href="https://docs.microsoft.com/en-us/python/api/azure-mgmt-authorization/azure.mgmt.authorization.v2020_04_01_preview.operations.roleassignmentsoperations?view=azure-python" rel="nofollow noreferrer">role assignment</a></strong> object</p>
  <p>Using the properties of <strong>id, name, type</strong> don't help me because I need the actual permissions</p>
  <p>Would appreciate some guidance here,
  Thanks!</p>