Office365-REST-Python-Client 2.6.0__py3-none-any.whl → 2.6.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.
Files changed (234) hide show
  1. {Office365_REST_Python_Client-2.6.0.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/METADATA +20 -29
  2. {Office365_REST_Python_Client-2.6.0.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/RECORD +233 -156
  3. office365/admin/people_settings.py +16 -0
  4. office365/admin/sharepoint_settings.py +50 -1
  5. office365/admin/sharing_capabilities.py +2 -0
  6. office365/communications/calls/participant.py +6 -0
  7. office365/communications/onlinemeetings/broadcast_settings.py +5 -0
  8. office365/communications/onlinemeetings/collection.py +29 -0
  9. office365/communications/onlinemeetings/online_meeting.py +1 -1
  10. office365/communications/onlinemeetings/recordings/call.py +5 -0
  11. office365/communications/onlinemeetings/restricted.py +5 -0
  12. office365/directory/applications/collection.py +11 -0
  13. office365/directory/audit/directory.py +31 -0
  14. office365/directory/audit/signins/signin.py +14 -0
  15. office365/directory/audit/target_resource.py +5 -0
  16. office365/directory/authentication/conditions/conditions.py +5 -1
  17. office365/directory/datapolicy/operation.py +39 -0
  18. office365/directory/directory.py +13 -0
  19. office365/directory/identitygovernance/accessreview/instance.py +29 -0
  20. office365/directory/identitygovernance/accessreview/stage.py +13 -0
  21. office365/directory/identitygovernance/accessreview/stages.py +11 -0
  22. office365/directory/identitygovernance/appconsent/request.py +9 -0
  23. office365/directory/identitygovernance/privilegedaccess/group.py +1 -1
  24. office365/directory/identitygovernance/privilegedaccess/schedule/__init__.py +0 -0
  25. office365/directory/identitygovernance/privilegedaccess/{group_assignment_schedule_instance.py → schedule/group_assignment_instance.py} +1 -1
  26. office365/directory/identitygovernance/privilegedaccess/schedule/schedule.py +6 -0
  27. office365/directory/insights/trending.py +25 -0
  28. office365/directory/licenses/assignment_state.py +5 -5
  29. office365/directory/licenses/details.py +6 -0
  30. office365/directory/permissions/scoped_role_membership.py +8 -0
  31. office365/directory/policies/applied_conditional_access.py +31 -0
  32. office365/directory/policies/feature_rollout.py +24 -0
  33. office365/directory/protection/information.py +73 -2
  34. office365/directory/protection/riskyusers/collection.py +1 -1
  35. office365/directory/protection/threatassessment/requests/__init__.py +0 -0
  36. office365/directory/protection/threatassessment/{email_file_request.py → requests/email_file.py} +9 -1
  37. office365/directory/protection/threatassessment/requests/file.py +10 -0
  38. office365/directory/protection/threatassessment/{mail_request.py → requests/mail.py} +1 -1
  39. office365/directory/protection/threatassessment/requests/url.py +9 -0
  40. office365/directory/rolemanagement/app_scope.py +14 -0
  41. office365/directory/rolemanagement/application.py +3 -2
  42. office365/directory/rolemanagement/role.py +15 -0
  43. office365/directory/rolemanagement/unifiedrole/__init__.py +0 -0
  44. office365/directory/rolemanagement/{unified_role_assignment.py → unifiedrole/assignment.py} +37 -1
  45. office365/directory/rolemanagement/{unified_role_definition.py → unifiedrole/definition.py} +6 -1
  46. office365/directory/security/alerts/file_security_state.py +5 -0
  47. office365/directory/security/attacksimulations/automation.py +8 -0
  48. office365/directory/security/attacksimulations/automation_run.py +8 -0
  49. office365/directory/security/attacksimulations/repeat_offender.py +7 -0
  50. office365/directory/security/attacksimulations/report.py +2 -2
  51. office365/directory/security/attacksimulations/user.py +5 -0
  52. office365/directory/security/incidents/incident.py +6 -1
  53. office365/directory/security/security.py +5 -0
  54. office365/directory/subscriptions/__init__.py +0 -0
  55. office365/directory/subscriptions/company.py +7 -0
  56. office365/directory/synchronization/progress.py +12 -0
  57. office365/directory/users/activities/activity.py +10 -1
  58. office365/directory/users/settings.py +51 -1
  59. office365/directory/users/storage.py +5 -0
  60. office365/directory/users/user.py +114 -3
  61. office365/entity_collection.py +21 -0
  62. office365/onedrive/contenttypes/collection.py +2 -0
  63. office365/onedrive/driveitems/driveItem.py +3 -2
  64. office365/onedrive/driveitems/publication_facet.py +6 -1
  65. office365/onedrive/filestorage/container.py +22 -0
  66. office365/onedrive/filestorage/container_collection.py +37 -0
  67. office365/onedrive/filestorage/file_storage.py +4 -4
  68. office365/onedrive/listitems/collection.py +38 -0
  69. office365/onedrive/lists/list.py +3 -5
  70. office365/onedrive/sitepages/base.py +8 -0
  71. office365/onedrive/sitepages/collection.py +8 -2
  72. office365/onedrive/sitepages/site_page.py +13 -2
  73. office365/onedrive/sites/site.py +1 -1
  74. office365/onedrive/workbooks/charts/title.py +12 -0
  75. office365/onedrive/workbooks/charts/title_format.py +5 -0
  76. office365/onedrive/workbooks/functions/functions.py +16 -0
  77. office365/onedrive/workbooks/ranges/border.py +30 -0
  78. office365/onedrive/workbooks/ranges/font.py +39 -0
  79. office365/onedrive/workbooks/ranges/range.py +6 -0
  80. office365/onedrive/workbooks/worksheets/protection_options.py +34 -5
  81. office365/outlook/calendar/events/event.py +57 -0
  82. office365/outlook/mail/automatic_replies_mailtips.py +20 -0
  83. office365/outlook/mail/folders/folder.py +3 -4
  84. office365/outlook/mail/messages/message.py +21 -4
  85. office365/outlook/mail/messages/rules/collection.py +26 -0
  86. office365/outlook/mail/tips/__init__.py +0 -0
  87. office365/outlook/mail/tips/error.py +5 -0
  88. office365/outlook/mail/tips/tips.py +41 -0
  89. office365/outlook/people/__init__.py +0 -0
  90. office365/outlook/people/profile_card_property.py +15 -0
  91. office365/outlook/person.py +7 -0
  92. office365/planner/category_descriptions.py +6 -0
  93. office365/planner/external_references.py +7 -0
  94. office365/planner/planner.py +4 -4
  95. office365/planner/plans/container.py +12 -0
  96. office365/planner/plans/details.py +31 -0
  97. office365/planner/tasks/collection.py +37 -0
  98. office365/planner/tasks/task.py +24 -0
  99. office365/planner/tasks/task_details.py +34 -1
  100. office365/planner/user_ids.py +8 -0
  101. office365/reports/internal/queries/create_report_query.py +12 -3
  102. office365/reports/root.py +61 -2
  103. office365/runtime/auth/authentication_context.py +10 -1
  104. office365/runtime/auth/providers/saml_token_provider.py +5 -13
  105. office365/runtime/auth/sts_profile.py +35 -18
  106. office365/runtime/client_object.py +1 -1
  107. office365/runtime/client_object_collection.py +3 -5
  108. office365/runtime/client_result.py +3 -3
  109. office365/runtime/client_runtime_context.py +2 -2
  110. office365/runtime/odata/json_format.py +14 -3
  111. office365/runtime/odata/request.py +1 -3
  112. office365/runtime/odata/v3/json_light_format.py +18 -0
  113. office365/runtime/odata/v4/json_format.py +19 -0
  114. office365/runtime/queries/client_query.py +13 -8
  115. office365/runtime/queries/create_entity.py +7 -5
  116. office365/runtime/queries/delete_entity.py +6 -2
  117. office365/runtime/queries/function.py +3 -4
  118. office365/runtime/queries/read_entity.py +3 -5
  119. office365/runtime/queries/service_operation.py +2 -7
  120. office365/search/acronyms/__init__.py +0 -0
  121. office365/search/answer.py +35 -0
  122. office365/search/bookmarks/__init__.py +0 -0
  123. office365/search/bookmarks/bookmark.py +7 -0
  124. office365/search/entity.py +81 -2
  125. office365/search/entity_type.py +6 -1
  126. office365/search/external/item.py +5 -0
  127. office365/search/identity_set.py +11 -0
  128. office365/search/qnas/__init__.py +0 -0
  129. office365/search/qnas/qna.py +9 -0
  130. office365/sharepoint/activities/client_response.py +2 -2
  131. office365/sharepoint/apps/launcher.py +9 -0
  132. office365/sharepoint/brandcenter/brand_center.py +26 -0
  133. office365/sharepoint/client_context.py +19 -1
  134. office365/sharepoint/compliance/preserve_document_submitter.py +5 -0
  135. office365/sharepoint/compliance/store_proxy.py +75 -0
  136. office365/sharepoint/convergence/migration_complete_state_api.py +9 -0
  137. office365/sharepoint/copilot/file_metadata.py +5 -0
  138. office365/sharepoint/fields/builtin_field_id.py +8 -0
  139. office365/sharepoint/files/collection.py +10 -0
  140. office365/sharepoint/files/file.py +24 -3
  141. office365/sharepoint/listitems/listitem.py +61 -3
  142. office365/sharepoint/lists/exporter.py +1 -0
  143. office365/sharepoint/lists/list.py +37 -3
  144. office365/sharepoint/migrationcenter/common/results/batch_creation.py +24 -0
  145. office365/sharepoint/migrationcenter/common/task.py +8 -0
  146. office365/sharepoint/migrationcenter/common/task_definition.py +7 -1
  147. office365/sharepoint/migrationcenter/common/teams/__init__.py +0 -0
  148. office365/sharepoint/migrationcenter/common/teams/channel_resource.py +5 -0
  149. office365/sharepoint/migrationcenter/common/teams/team_resource.py +5 -0
  150. office365/sharepoint/migrationcenter/common/url_parser.py +39 -0
  151. office365/sharepoint/migrationcenter/service/services.py +13 -1
  152. office365/sharepoint/migrationcenter/service/teams.py +11 -0
  153. office365/sharepoint/navigation/node.py +7 -16
  154. office365/sharepoint/policy/license_utilities.py +1 -0
  155. office365/sharepoint/portal/groups/creation_context.py +11 -0
  156. office365/sharepoint/portal/groups/service.py +1 -1
  157. office365/sharepoint/portal/groups/site_manager.py +1 -1
  158. office365/sharepoint/publishing/pages/3d/__init__.py +0 -0
  159. office365/sharepoint/publishing/pages/3d/types.py +5 -0
  160. office365/sharepoint/publishing/pages/campaign/__init__.py +0 -0
  161. office365/sharepoint/publishing/pages/{campaign_publication.py → campaign/publication.py} +2 -0
  162. office365/sharepoint/publishing/pages/campaign/types.py +18 -0
  163. office365/sharepoint/publishing/pages/coauth_state.py +20 -0
  164. office365/sharepoint/publishing/pages/dependency_metadata.py +9 -0
  165. office365/sharepoint/publishing/pages/metadata.py +0 -10
  166. office365/sharepoint/publishing/pages/page.py +29 -0
  167. office365/sharepoint/publishing/pages/service.py +27 -6
  168. office365/sharepoint/publishing/pages/topics/collection.py +1 -1
  169. office365/sharepoint/request.py +6 -2
  170. office365/sharepoint/search/administration/tenant_crawl_versions_info_provider.py +16 -0
  171. office365/sharepoint/sharing/access_request_settings.py +18 -0
  172. office365/sharepoint/sharing/address_bar_link_settings.py +5 -0
  173. office365/sharepoint/sharing/information.py +2 -0
  174. office365/sharepoint/sharing/links/partial_success_response.py +4 -0
  175. office365/sharepoint/sites/azure_container_Info.py +4 -1
  176. office365/sharepoint/sites/brand_center_configuration.py +5 -0
  177. office365/sharepoint/sites/manager/__init__.py +0 -0
  178. office365/sharepoint/sites/manager/service.py +34 -0
  179. office365/sharepoint/sites/manager/types.py +5 -0
  180. office365/sharepoint/sites/site.py +54 -0
  181. office365/sharepoint/sites/themes.py +5 -0
  182. office365/sharepoint/storagemetrics/storage_metrics.py +18 -0
  183. office365/sharepoint/tenant/administration/copilot/agentinsights/__init__.py +0 -0
  184. office365/sharepoint/tenant/administration/copilot/agentinsights/client.py +42 -0
  185. office365/sharepoint/tenant/administration/copilot/agentinsights/report_metadata.py +5 -0
  186. office365/sharepoint/tenant/administration/group.py +34 -0
  187. office365/sharepoint/tenant/administration/policies/file_version_types.py +17 -0
  188. office365/sharepoint/tenant/administration/policies/list_parameters.py +9 -0
  189. office365/sharepoint/tenant/administration/policies/resource_storage.py +9 -0
  190. office365/sharepoint/tenant/administration/sites/properties_enumerable_filter.py +6 -0
  191. office365/sharepoint/tenant/administration/tenant.py +182 -5
  192. office365/sharepoint/userprofiles/people_manager.py +3 -1
  193. office365/sharepoint/utilities/utility.py +16 -0
  194. office365/sharepoint/webparts/definition.py +26 -0
  195. office365/sharepoint/webparts/limited_manager.py +53 -0
  196. office365/sharepoint/webparts/webpart.py +47 -0
  197. office365/sharepoint/webs/regional_settings.py +27 -0
  198. office365/sharepoint/webs/web.py +20 -1
  199. office365/teams/apps/app.py +17 -0
  200. office365/teams/apps/authorization.py +16 -0
  201. office365/teams/apps/permission_set.py +14 -0
  202. office365/teams/apps/resource_specific_permission.py +5 -0
  203. office365/teams/chats/chat.py +60 -0
  204. office365/teams/chats/messages/message.py +17 -0
  205. office365/teams/chats/type.py +13 -0
  206. office365/teams/chats/viewpoint.py +5 -0
  207. office365/teams/fun_settings.py +14 -2
  208. office365/teams/info.py +1 -1
  209. office365/teams/schedule/entity.py +3 -0
  210. office365/teams/schedule/shifts/item.py +1 -0
  211. office365/teams/schedule/shifts/offer/request.py +41 -1
  212. office365/teams/teamwork/activity_topic.py +5 -0
  213. office365/teams/teamwork/online_meeting_info.py +21 -0
  214. office365/teams/teamwork/shiftmanagement/__init__.py +0 -0
  215. office365/teams/teamwork/shiftmanagement/user_solution_root.py +5 -0
  216. office365/teams/teamwork/user.py +48 -1
  217. office365/teams/teamwork/user_identity.py +5 -0
  218. office365/teams/viva/community.py +13 -0
  219. office365/teams/viva/employee_experience.py +27 -0
  220. office365/teams/viva/employee_experience_user.py +16 -0
  221. office365/teams/viva/learning/courses/self_initiated.py +5 -0
  222. office365/todo/attachments/task_file.py +3 -0
  223. office365/todo/checklist_item.py +11 -0
  224. office365/todo/tasks/list.py +11 -0
  225. office365/todo/tasks/task.py +31 -0
  226. office365/outlook/mail/tips.py +0 -17
  227. {Office365_REST_Python_Client-2.6.0.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/LICENSE +0 -0
  228. {Office365_REST_Python_Client-2.6.0.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/WHEEL +0 -0
  229. {Office365_REST_Python_Client-2.6.0.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/top_level.txt +0 -0
  230. /office365/directory/identitygovernance/privilegedaccess/{schedule_instance.py → schedule/instance.py} +0 -0
  231. /office365/directory/protection/threatassessment/{request.py → requests/request.py} +0 -0
  232. /office365/directory/rolemanagement/{unified_role_permission.py → unifiedrole/permission.py} +0 -0
  233. /office365/search/{acronym.py → acronyms/acronym.py} +0 -0
  234. /office365/sharepoint/publishing/pages/{page_3d.py → 3d/page.py} +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: Office365-REST-Python-Client
3
- Version: 2.6.0
3
+ Version: 2.6.2
4
4
  Summary: Microsoft 365 & Microsoft Graph Library for Python
5
5
  Home-page: https://github.com/vgrem/Office365-REST-Python-Client
6
6
  Author: Vadim Gremyachev
@@ -34,6 +34,7 @@ Requires-Dist: typing-extensions >=4.0.0
34
34
  Provides-Extra: ntlmprovider
35
35
  Requires-Dist: requests-ntlm ; extra == 'ntlmprovider'
36
36
 
37
+
37
38
  # About
38
39
  Microsoft 365 & Microsoft Graph library for Python
39
40
 
@@ -208,19 +209,18 @@ The list of examples:
208
209
 
209
210
  Refer [examples section](examples/sharepoint) for another scenarios
210
211
 
211
- ### Support for non-standard SharePoint Online Environments
212
-
213
- Support for non-standard SharePoint Environments is currently being implemented. Currently supported:
214
- - GCC High
212
+ ### Support for Azure environments
215
213
 
216
- To enable authentication to GCC High endpoints, add the `environment='GCCH'` parameter when calling the
214
+ To enable authentication to specific Azure environment endpoints, add the `environment` parameter when calling the
217
215
  `ClientContext class` with `.with_user_credentials`, `.with_client_credentials`, or `.with_credentials`
218
216
 
219
217
  Example:
220
218
  ```python
219
+ from office365.azure_env import AzureEnvironment
221
220
  from office365.sharepoint.client_context import ClientContext
221
+ from office365.runtime.auth.client_credential import ClientCredential
222
222
  client_credentials = ClientCredential('{client_id}','{client_secret}')
223
- ctx = ClientContext('{url}').with_credentials(client_credentials, environment='GCCH')
223
+ ctx = ClientContext('{site-url}', environment=AzureEnvironment.USGovernmentHigh).with_credentials(client_credentials)
224
224
  ```
225
225
 
226
226
  # Working with Outlook API
@@ -249,26 +249,13 @@ Using [Microsoft Authentication Library (MSAL) for Python](https://pypi.org/proj
249
249
  > in the provided examples. Other forms of token acquisition can be found here: https://msal-python.readthedocs.io/en/latest/
250
250
 
251
251
  ```python
252
- import msal
253
252
  from office365.graph_client import GraphClient
254
-
255
- def acquire_token():
256
- """
257
- Acquire token via MSAL
258
- """
259
- authority_url = 'https://login.microsoftonline.com/{tenant_id_or_name}'
260
- app = msal.ConfidentialClientApplication(
261
- authority=authority_url,
262
- client_id='{client_id}',
263
- client_credential='{client_secret}'
264
- )
265
- token = app.acquire_token_for_client(scopes=["https://graph.microsoft.com/.default"])
266
- return token
267
-
268
-
269
- client = GraphClient(acquire_token)
270
-
253
+ client = GraphClient(tenant='{tenant_name_or_id}').with_client_secret(
254
+ client_id='{client_id}',
255
+ client_secret='{client_secret}'
256
+ )
271
257
  ```
258
+ Example: [with_client_secret](examples/auth/with_client_secret.py)
272
259
 
273
260
  But in terms of Microsoft Graph API authentication, another OAuth spec compliant libraries
274
261
  such as [adal](https://github.com/AzureAD/azure-activedirectory-library-for-python)
@@ -304,7 +291,9 @@ The example demonstrates how to send an email via [Microsoft Graph endpoint](htt
304
291
  ```python
305
292
  from office365.graph_client import GraphClient
306
293
 
307
- client = GraphClient(acquire_token_func)
294
+ client = GraphClient(tenant='{tenant_name_or_id}').with_username_and_password(
295
+ '{client_id}', '{username}', '{password}'
296
+ )
308
297
 
309
298
  client.me.send_mail(
310
299
  subject="Meet for lunch?",
@@ -370,7 +359,7 @@ which corresponds to [`list available drives` endpoint](https://docs.microsoft.c
370
359
  from office365.graph_client import GraphClient
371
360
 
372
361
  tenant_name = "contoso.onmicrosoft.com"
373
- client = GraphClient(acquire_token_func)
362
+ client = GraphClient(tenant=tenant_name)
374
363
  drives = client.drives.get().execute_query()
375
364
  for drive in drives:
376
365
  print("Drive url: {0}".format(drive.web_url))
@@ -381,7 +370,7 @@ for drive in drives:
381
370
 
382
371
  ```python
383
372
  from office365.graph_client import GraphClient
384
- client = GraphClient(acquire_token_func)
373
+ client = GraphClient(tenant="contoso.onmicrosoft.com")
385
374
  # retrieve drive properties
386
375
  drive = client.users["{user_id_or_principal_name}"].drive.get().execute_query()
387
376
  # download files from OneDrive into local folder
@@ -451,7 +440,9 @@ Example: Create a new page
451
440
 
452
441
  ```python
453
442
  from office365.graph_client import GraphClient
454
- client = GraphClient(acquire_token_func)
443
+ client = GraphClient(tenant='{tenant_name_or_id}').with_username_and_password(
444
+ '{client_id}', '{username}', '{password}'
445
+ )
455
446
 
456
447
  files = {}
457
448
  with open("./MyPage.html", 'rb') as f, \