ms-graph 1.5.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ms_graph/__init__.py +5 -0
- ms_graph/client.py +546 -0
- ms_graph/drive_items.py +296 -0
- ms_graph/drives.py +384 -0
- ms_graph/groups.py +51 -0
- ms_graph/logger/logger_setup.py +7 -0
- ms_graph/mail.py +1073 -0
- ms_graph/notes.py +276 -0
- ms_graph/personal_contacts.py +226 -0
- ms_graph/search.py +48 -0
- ms_graph/session.py +182 -0
- ms_graph/users.py +45 -0
- ms_graph/utils/range.py +331 -0
- ms_graph/workbooks_and_charts/__init__.py +23 -0
- ms_graph/workbooks_and_charts/application.py +109 -0
- ms_graph/workbooks_and_charts/comments.py +159 -0
- ms_graph/workbooks_and_charts/enums.py +252 -0
- ms_graph/workbooks_and_charts/range.py +694 -0
- ms_graph/workbooks_and_charts/table.py +467 -0
- ms_graph/workbooks_and_charts/workbook.py +253 -0
- ms_graph/workbooks_and_charts/worksheets.py +636 -0
- ms_graph-1.5.2.dist-info/METADATA +319 -0
- ms_graph-1.5.2.dist-info/RECORD +25 -0
- ms_graph-1.5.2.dist-info/WHEEL +4 -0
- ms_graph-1.5.2.dist-info/licenses/LICENSE +21 -0
ms_graph/groups.py
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
from ms_graph.session import GraphSession
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class Groups():
|
|
5
|
+
|
|
6
|
+
"""
|
|
7
|
+
## Overview:
|
|
8
|
+
----
|
|
9
|
+
Groups are collections of users and other principals who share
|
|
10
|
+
access to resources in Microsoft services or in your app. Microsoft
|
|
11
|
+
Graph provides APIs that you can use to create and manage different
|
|
12
|
+
types of groups and group functionality according to your scenario.
|
|
13
|
+
All group-related operations in Microsoft Graph require administrator
|
|
14
|
+
consent.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
def __init__(self, session: object) -> None:
|
|
18
|
+
"""Initializes the `Group` service.
|
|
19
|
+
|
|
20
|
+
### Parameters
|
|
21
|
+
----
|
|
22
|
+
session : object
|
|
23
|
+
An authenticated session for our Microsoft Graph Client.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
# Set the session.
|
|
27
|
+
self.graph_session: GraphSession = session
|
|
28
|
+
|
|
29
|
+
# Set the endpoint.
|
|
30
|
+
self.endpoint = "group"
|
|
31
|
+
self.collections_endpoint = "groups"
|
|
32
|
+
|
|
33
|
+
def list_groups(self) -> dict:
|
|
34
|
+
"""List all the groups in an organization, including but
|
|
35
|
+
not limited to Microsoft 365 groups.
|
|
36
|
+
|
|
37
|
+
### Returns
|
|
38
|
+
-------
|
|
39
|
+
dict :
|
|
40
|
+
If successful, this method returns a 200 OK
|
|
41
|
+
response code and collection of group objects in
|
|
42
|
+
the response body. The response includes only the
|
|
43
|
+
default properties of each group.
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
content = self.graph_session.make_request(
|
|
47
|
+
method="get",
|
|
48
|
+
endpoint=self.collections_endpoint
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
return content
|