Skip to content

Commit ea237d4

Browse files
author
Alejandro Casanovas
committed
Readme: a brief explanation on Directory and Users
1 parent 9c5e47d commit ea237d4

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ What follows is kind of a wiki...
6464
- [Account Class and Modularity](#account)
6565
- [MailBox](#mailbox)
6666
- [AddressBook](#addressbook)
67+
- [Directory and Users](#directory-and-users)
6768
- [Calendar](#calendar)
6869
- [OneDrive](#onedrive)
6970
- [Excel](#excel)
@@ -887,6 +888,21 @@ new_contact.delete() # Bonus: deteled from the cloud
887888
```
888889

889890

891+
## Directory and Users
892+
The Directory object can retrieve users.
893+
894+
A User instance contains by default the [basic properties of the user](https://docs.microsoft.com/en-us/graph/api/user-list?view=graph-rest-1.0&tabs=http#optional-query-parameters).
895+
If you want to include more, you will have to select the desired properties manually.
896+
897+
Check [The Global Address List](#the-global-address-list) for further information.
898+
899+
```python
900+
directory = account.directory()
901+
for user in directory.get_users():
902+
print(user)
903+
```
904+
905+
890906
## Calendar
891907
The calendar and events functionality is group in a `Schedule` object.
892908

0 commit comments

Comments
 (0)