Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

List user with roles #786

Open
donkerm opened this issue Nov 9, 2021 · 2 comments
Open

List user with roles #786

donkerm opened this issue Nov 9, 2021 · 2 comments

Comments

@donkerm
Copy link

donkerm commented Nov 9, 2021

Hi all,

I am not able to list users in organisation with roles.
Is there a call or combination of calls I can do to retrieve the information?
Latest version of pyvcloud installed in combination with vCloud 10.2.1.17444397

I found the response:

    users = org.list_users()
    for user in users:
        name = user.get('name')

        usr = org.get_user(name)
        print(usr.keys())
        print(usr.values())

        print(Utils.to_dict(usr))
        
	dict_usr = Utils.to_dict(usr)
        for key, value in dict_usr.items():
            print(key, value)
			



['name', 'id', 'href', 'type']

['engineer', 'urn:vcloud:user:2b1c556c-70c3-4f52-9c8f-c498f979e5da', 'https://vcloud', 'application/vnd.vmware.admin.user+xml']

{'name': 'engineer', 'id': '2b1c556c-70c3-4f52-9c8f-c498f979e55a', 
'Link': None, 'Description': 'Description', 'FullName': 'devops engineer', 
'EmailAddress': '[email protected]', 'Telephone': '+(1)1111111', 'IsEnabled': 
'true', 'IsLocked': 'false', 'IM': 'test_user_im', 'NameInSource': 'engineer', 
'IsExternal': 'false', 'ProviderType': 'INTEGRATED', 'IsGroupRole': 
'false', 'Role': None, 'GroupReferences': None}


name engineer
id 2b1c556c-70c3-4f52-9c8f-c498f979e5da
Link None
Description Description
FullName devops engineer
EmailAddress [email protected]
Telephone +(1)11111111
IsEnabled true
IsLocked false
IM test_user_im
NameInSource engineer
IsExternal false
ProviderType INTEGRATED
IsGroupRole false
Role None
GroupReferences None
Logging out

Is there anyone who knows why value is none, or how I can retrieve users with roles?

Kind Regards

@donkerm
Copy link
Author

donkerm commented Aug 23, 2023

Anyone?

@devopsdonker
Copy link

devopsdonker commented Nov 29, 2023

I there anybody with a way to retrieve this data?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants