Office365-REST-Python-Client 2.6.1__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 (233) hide show
  1. {Office365_REST_Python_Client-2.6.1.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/METADATA +1 -1
  2. {Office365_REST_Python_Client-2.6.1.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/RECORD +232 -155
  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/sts_profile.py +3 -1
  105. office365/runtime/client_object.py +1 -1
  106. office365/runtime/client_object_collection.py +3 -5
  107. office365/runtime/client_result.py +3 -3
  108. office365/runtime/client_runtime_context.py +2 -2
  109. office365/runtime/odata/json_format.py +14 -3
  110. office365/runtime/odata/request.py +1 -3
  111. office365/runtime/odata/v3/json_light_format.py +18 -0
  112. office365/runtime/odata/v4/json_format.py +19 -0
  113. office365/runtime/queries/client_query.py +13 -8
  114. office365/runtime/queries/create_entity.py +7 -5
  115. office365/runtime/queries/delete_entity.py +6 -2
  116. office365/runtime/queries/function.py +3 -4
  117. office365/runtime/queries/read_entity.py +3 -5
  118. office365/runtime/queries/service_operation.py +2 -7
  119. office365/search/acronyms/__init__.py +0 -0
  120. office365/search/answer.py +35 -0
  121. office365/search/bookmarks/__init__.py +0 -0
  122. office365/search/bookmarks/bookmark.py +7 -0
  123. office365/search/entity.py +81 -2
  124. office365/search/entity_type.py +6 -1
  125. office365/search/external/item.py +5 -0
  126. office365/search/identity_set.py +11 -0
  127. office365/search/qnas/__init__.py +0 -0
  128. office365/search/qnas/qna.py +9 -0
  129. office365/sharepoint/activities/client_response.py +2 -2
  130. office365/sharepoint/apps/launcher.py +9 -0
  131. office365/sharepoint/brandcenter/brand_center.py +26 -0
  132. office365/sharepoint/client_context.py +19 -1
  133. office365/sharepoint/compliance/preserve_document_submitter.py +5 -0
  134. office365/sharepoint/compliance/store_proxy.py +75 -0
  135. office365/sharepoint/convergence/migration_complete_state_api.py +9 -0
  136. office365/sharepoint/copilot/file_metadata.py +5 -0
  137. office365/sharepoint/fields/builtin_field_id.py +8 -0
  138. office365/sharepoint/files/collection.py +10 -0
  139. office365/sharepoint/files/file.py +24 -3
  140. office365/sharepoint/listitems/listitem.py +61 -3
  141. office365/sharepoint/lists/exporter.py +1 -0
  142. office365/sharepoint/lists/list.py +37 -3
  143. office365/sharepoint/migrationcenter/common/results/batch_creation.py +24 -0
  144. office365/sharepoint/migrationcenter/common/task.py +8 -0
  145. office365/sharepoint/migrationcenter/common/task_definition.py +7 -1
  146. office365/sharepoint/migrationcenter/common/teams/__init__.py +0 -0
  147. office365/sharepoint/migrationcenter/common/teams/channel_resource.py +5 -0
  148. office365/sharepoint/migrationcenter/common/teams/team_resource.py +5 -0
  149. office365/sharepoint/migrationcenter/common/url_parser.py +39 -0
  150. office365/sharepoint/migrationcenter/service/services.py +13 -1
  151. office365/sharepoint/migrationcenter/service/teams.py +11 -0
  152. office365/sharepoint/navigation/node.py +7 -16
  153. office365/sharepoint/policy/license_utilities.py +1 -0
  154. office365/sharepoint/portal/groups/creation_context.py +11 -0
  155. office365/sharepoint/portal/groups/service.py +1 -1
  156. office365/sharepoint/portal/groups/site_manager.py +1 -1
  157. office365/sharepoint/publishing/pages/3d/__init__.py +0 -0
  158. office365/sharepoint/publishing/pages/3d/types.py +5 -0
  159. office365/sharepoint/publishing/pages/campaign/__init__.py +0 -0
  160. office365/sharepoint/publishing/pages/{campaign_publication.py → campaign/publication.py} +2 -0
  161. office365/sharepoint/publishing/pages/campaign/types.py +18 -0
  162. office365/sharepoint/publishing/pages/coauth_state.py +20 -0
  163. office365/sharepoint/publishing/pages/dependency_metadata.py +9 -0
  164. office365/sharepoint/publishing/pages/metadata.py +0 -10
  165. office365/sharepoint/publishing/pages/page.py +29 -0
  166. office365/sharepoint/publishing/pages/service.py +27 -6
  167. office365/sharepoint/publishing/pages/topics/collection.py +1 -1
  168. office365/sharepoint/request.py +5 -1
  169. office365/sharepoint/search/administration/tenant_crawl_versions_info_provider.py +16 -0
  170. office365/sharepoint/sharing/access_request_settings.py +18 -0
  171. office365/sharepoint/sharing/address_bar_link_settings.py +5 -0
  172. office365/sharepoint/sharing/information.py +2 -0
  173. office365/sharepoint/sharing/links/partial_success_response.py +4 -0
  174. office365/sharepoint/sites/azure_container_Info.py +4 -1
  175. office365/sharepoint/sites/brand_center_configuration.py +5 -0
  176. office365/sharepoint/sites/manager/__init__.py +0 -0
  177. office365/sharepoint/sites/manager/service.py +34 -0
  178. office365/sharepoint/sites/manager/types.py +5 -0
  179. office365/sharepoint/sites/site.py +54 -0
  180. office365/sharepoint/sites/themes.py +5 -0
  181. office365/sharepoint/storagemetrics/storage_metrics.py +18 -0
  182. office365/sharepoint/tenant/administration/copilot/agentinsights/__init__.py +0 -0
  183. office365/sharepoint/tenant/administration/copilot/agentinsights/client.py +42 -0
  184. office365/sharepoint/tenant/administration/copilot/agentinsights/report_metadata.py +5 -0
  185. office365/sharepoint/tenant/administration/group.py +34 -0
  186. office365/sharepoint/tenant/administration/policies/file_version_types.py +17 -0
  187. office365/sharepoint/tenant/administration/policies/list_parameters.py +9 -0
  188. office365/sharepoint/tenant/administration/policies/resource_storage.py +9 -0
  189. office365/sharepoint/tenant/administration/sites/properties_enumerable_filter.py +6 -0
  190. office365/sharepoint/tenant/administration/tenant.py +182 -5
  191. office365/sharepoint/userprofiles/people_manager.py +3 -1
  192. office365/sharepoint/utilities/utility.py +16 -0
  193. office365/sharepoint/webparts/definition.py +26 -0
  194. office365/sharepoint/webparts/limited_manager.py +53 -0
  195. office365/sharepoint/webparts/webpart.py +47 -0
  196. office365/sharepoint/webs/regional_settings.py +27 -0
  197. office365/sharepoint/webs/web.py +20 -1
  198. office365/teams/apps/app.py +17 -0
  199. office365/teams/apps/authorization.py +16 -0
  200. office365/teams/apps/permission_set.py +14 -0
  201. office365/teams/apps/resource_specific_permission.py +5 -0
  202. office365/teams/chats/chat.py +60 -0
  203. office365/teams/chats/messages/message.py +17 -0
  204. office365/teams/chats/type.py +13 -0
  205. office365/teams/chats/viewpoint.py +5 -0
  206. office365/teams/fun_settings.py +14 -2
  207. office365/teams/info.py +1 -1
  208. office365/teams/schedule/entity.py +3 -0
  209. office365/teams/schedule/shifts/item.py +1 -0
  210. office365/teams/schedule/shifts/offer/request.py +41 -1
  211. office365/teams/teamwork/activity_topic.py +5 -0
  212. office365/teams/teamwork/online_meeting_info.py +21 -0
  213. office365/teams/teamwork/shiftmanagement/__init__.py +0 -0
  214. office365/teams/teamwork/shiftmanagement/user_solution_root.py +5 -0
  215. office365/teams/teamwork/user.py +48 -1
  216. office365/teams/teamwork/user_identity.py +5 -0
  217. office365/teams/viva/community.py +13 -0
  218. office365/teams/viva/employee_experience.py +27 -0
  219. office365/teams/viva/employee_experience_user.py +16 -0
  220. office365/teams/viva/learning/courses/self_initiated.py +5 -0
  221. office365/todo/attachments/task_file.py +3 -0
  222. office365/todo/checklist_item.py +11 -0
  223. office365/todo/tasks/list.py +11 -0
  224. office365/todo/tasks/task.py +31 -0
  225. office365/outlook/mail/tips.py +0 -17
  226. {Office365_REST_Python_Client-2.6.1.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/LICENSE +0 -0
  227. {Office365_REST_Python_Client-2.6.1.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/WHEEL +0 -0
  228. {Office365_REST_Python_Client-2.6.1.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/top_level.txt +0 -0
  229. /office365/directory/identitygovernance/privilegedaccess/{schedule_instance.py → schedule/instance.py} +0 -0
  230. /office365/directory/protection/threatassessment/{request.py → requests/request.py} +0 -0
  231. /office365/directory/rolemanagement/{unified_role_permission.py → unifiedrole/permission.py} +0 -0
  232. /office365/search/{acronym.py → acronyms/acronym.py} +0 -0
  233. /office365/sharepoint/publishing/pages/{page_3d.py → 3d/page.py} +0 -0
@@ -1,5 +1,21 @@
1
1
  from office365.entity import Entity
2
+ from office365.entity_collection import EntityCollection
3
+ from office365.outlook.people.profile_card_property import ProfileCardProperty
4
+ from office365.runtime.paths.resource_path import ResourcePath
2
5
 
3
6
 
4
7
  class PeopleAdminSettings(Entity):
5
8
  """Represents a setting to control people-related admin settings in the tenant."""
9
+
10
+ @property
11
+ def profile_card_properties(self):
12
+ """Contains a collection of the properties an administrator has defined as visible on the
13
+ Microsoft 365 profile card."""
14
+ return self.properties.get(
15
+ "profileCardProperties",
16
+ EntityCollection(
17
+ self.context,
18
+ ProfileCardProperty,
19
+ ResourcePath("profileCardProperties", self.resource_path),
20
+ ),
21
+ )
@@ -1,4 +1,4 @@
1
- from typing import Optional
1
+ from typing import List, Optional
2
2
 
3
3
  from office365.entity import Entity
4
4
  from office365.onedrive.idle_session_signout import IdleSessionSignOut
@@ -39,6 +39,49 @@ class SharepointSettings(Entity):
39
39
  """Indicates whether comments are allowed on modern site pages in SharePoint."""
40
40
  return self.properties.get("isCommentingOnSitePagesEnabled", None)
41
41
 
42
+ @property
43
+ def sharing_allowed_domain_list(self):
44
+ # type: () -> StringCollection
45
+ """
46
+ Collection of email domains that are allowed for sharing outside the organization.
47
+ """
48
+ return self.properties.get("sharingAllowedDomainList", StringCollection())
49
+
50
+ @property
51
+ def sharing_blocked_domain_list(self):
52
+ # type: () -> StringCollection
53
+ """
54
+ Collection of email domains that are blocked for sharing outside the organization.
55
+ """
56
+ return self.properties.get("sharingBlockedDomainList", StringCollection())
57
+
58
+ @sharing_blocked_domain_list.setter
59
+ def sharing_blocked_domain_list(self, value):
60
+ # type: (List[str]) -> None
61
+ """Sets the collection of email domains that are blocked for sharing outside the organization."""
62
+ self.set_property("sharingBlockedDomainList", value)
63
+
64
+ @property
65
+ def sharing_capability(self):
66
+ # type: () -> Optional[str]
67
+ """
68
+ Sharing capability for the tenant.
69
+ Possible values are:
70
+ disabled,
71
+ externalUserSharingOnly,
72
+ externalUserAndGuestSharing,
73
+ existingExternalUserSharingOnly.
74
+ """
75
+ return self.properties.get("sharingCapability", None)
76
+
77
+ @property
78
+ def sharing_domain_restriction_mode(self):
79
+ # type: () -> Optional[str]
80
+ """
81
+ Specifies the external sharing mode for domains. Possible values are: none, allowList, blockList.
82
+ """
83
+ return self.properties.get("sharingDomainRestrictionMode", None)
84
+
42
85
  @property
43
86
  def site_creation_default_managed_path(self):
44
87
  # type: () -> Optional[str]
@@ -62,12 +105,18 @@ class SharepointSettings(Entity):
62
105
  """
63
106
  return self.properties.get("tenantDefaultTimezone", None)
64
107
 
108
+ @property
109
+ def entity_type_name(self):
110
+ return None
111
+
65
112
  def get_property(self, name, default_value=None):
66
113
  if default_value is None:
67
114
  property_mapping = {
68
115
  "allowedDomainGuidsForSyncApp": self.allowed_domain_guids_for_sync_app,
69
116
  "availableManagedPathsForSiteCreation": self.available_managed_paths_for_site_creation,
70
117
  "excludedFileExtensionsForSyncApp": self.excluded_file_extensions_for_sync_app,
118
+ "sharingAllowedDomainList": self.sharing_allowed_domain_list,
119
+ "sharingBlockedDomainList": self.sharing_blocked_domain_list,
71
120
  }
72
121
  default_value = property_mapping.get(name, None)
73
122
  return super(SharepointSettings, self).get_property(name, default_value)
@@ -0,0 +1,2 @@
1
+ class SharingCapabilities:
2
+ """"""
@@ -4,6 +4,7 @@ from office365.communications.calls.invitation_participant_info import (
4
4
  InvitationParticipantInfo,
5
5
  )
6
6
  from office365.communications.calls.participant_info import ParticipantInfo
7
+ from office365.communications.onlinemeetings.restricted import OnlineMeetingRestricted
7
8
  from office365.communications.operations.invite_participants import (
8
9
  InviteParticipantsOperation,
9
10
  )
@@ -73,3 +74,8 @@ class Participant(Entity):
73
74
  # type: () -> Optional[str]
74
75
  """A blob of data provided by the participant in the roster."""
75
76
  return self.properties.get("metadata", None)
77
+
78
+ @property
79
+ def restricted_experience(self):
80
+ """Information about the reason or reasons media content from a participant is restricted."""
81
+ return self.properties.get("restrictedExperience", OnlineMeetingRestricted())
@@ -0,0 +1,5 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class BroadcastMeetingSettings(ClientValue):
5
+ """Represents settings related to a live event in Microsoft Teams."""
@@ -1,4 +1,5 @@
1
1
  from office365.communications.onlinemeetings.online_meeting import OnlineMeeting
2
+ from office365.communications.onlinemeetings.recordings.call import CallRecording
2
3
  from office365.entity_collection import EntityCollection
3
4
  from office365.runtime.queries.create_entity import CreateEntityQuery
4
5
  from office365.runtime.queries.service_operation import ServiceOperationQuery
@@ -65,3 +66,31 @@ class OnlineMeetingCollection(EntityCollection[OnlineMeeting]):
65
66
  )
66
67
  self.context.add_query(qry)
67
68
  return return_type
69
+
70
+ def get_all_recordings(
71
+ self, meeting_organizer_user_id, start_datetime=None, end_datetime=None
72
+ ):
73
+ """
74
+ Get all recordings from scheduled onlineMeeting instances for which the specified user is the organizer.
75
+ This API currently doesn't support getting call recordings from channel meetings.
76
+
77
+ :param str meeting_organizer_user_id: The user identifier of the meeting organizer to filter for artifacts
78
+ for meetings organized by the given user identifier.
79
+ :param datetime.datetime start_datetime: Optional parameter to filter for artifacts created after the given
80
+ start date. The timestamp type represents date and time information using ISO 8601 format and is always
81
+ in UTC
82
+ :param datetime.datetime end_datetime: Optional parameter to filter for artifacts created before the given
83
+ end date. The timestamp type represents date and time information using ISO 8601 format and is always
84
+ in UTC
85
+ """
86
+ return_type = EntityCollection(self.context, CallRecording)
87
+ payload = {
88
+ "meetingOrganizerUserId": meeting_organizer_user_id,
89
+ "startDateTime": start_datetime,
90
+ "endDateTime": end_datetime,
91
+ }
92
+ qry = ServiceOperationQuery(
93
+ self, "getAllRecordings", None, payload, None, return_type
94
+ )
95
+ self.context.add_query(qry)
96
+ return return_type
@@ -124,7 +124,7 @@ class OnlineMeeting(Entity):
124
124
  @property
125
125
  def recordings(self):
126
126
  # type: () -> EntityCollection[CallRecording]
127
- """he recordings of an online meeting"""
127
+ """The recordings of an online meeting"""
128
128
  return self.properties.get(
129
129
  "recordings",
130
130
  EntityCollection(
@@ -3,3 +3,8 @@ from office365.entity import Entity
3
3
 
4
4
  class CallRecording(Entity):
5
5
  """Represents a recording associated with an online meeting."""
6
+
7
+ @property
8
+ def call_id(self):
9
+ """The unique identifier for the call that is related to this recording. Read-only."""
10
+ return self.properties.get("callId", None)
@@ -0,0 +1,5 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class OnlineMeetingRestricted(ClientValue):
5
+ """Indicates the reason or reasons media content from a participant is restricted."""
@@ -9,6 +9,17 @@ class ApplicationCollection(DeltaCollection[Application]):
9
9
  def __init__(self, context, resource_path=None):
10
10
  super(ApplicationCollection, self).__init__(context, Application, resource_path)
11
11
 
12
+ def add(self, display_name, **kwargs):
13
+ """
14
+ Create a new application object.
15
+ :param str display_name: Display name of the application.
16
+ """
17
+ props = {
18
+ "displayName": display_name,
19
+ **kwargs,
20
+ }
21
+ return super(ApplicationCollection, self).add(**props)
22
+
12
23
  def get_by_app_id(self, app_id):
13
24
  # type: (str) -> Application
14
25
  """Retrieves application by Application client identifier
@@ -2,7 +2,9 @@ import datetime
2
2
  from typing import Optional
3
3
 
4
4
  from office365.directory.audit.activity_initiator import AuditActivityInitiator
5
+ from office365.directory.audit.target_resource import TargetResource
5
6
  from office365.entity import Entity
7
+ from office365.runtime.client_value_collection import ClientValueCollection
6
8
 
7
9
 
8
10
  class DirectoryAudit(Entity):
@@ -25,6 +27,14 @@ class DirectoryAudit(Entity):
25
27
  """
26
28
  return self.properties.get("activityDisplayName", None)
27
29
 
30
+ @property
31
+ def additional_details(self):
32
+ # type: () -> Optional[dict]
33
+ """
34
+ Indicates additional details on the activity.
35
+ """
36
+ return self.properties.get("additionalDetails", None)
37
+
28
38
  @property
29
39
  def category(self):
30
40
  # type: () -> Optional[str]
@@ -69,6 +79,14 @@ class DirectoryAudit(Entity):
69
79
  """
70
80
  return self.properties.get("loggedByService", None)
71
81
 
82
+ @property
83
+ def result(self):
84
+ # type: () -> Optional[str]
85
+ """
86
+ Indicates the result of the activity. Possible values are: success, failure, timeout, unknownFutureValue.
87
+ """
88
+ return self.properties.get("result", None)
89
+
72
90
  @property
73
91
  def result_reason(self):
74
92
  # type: () -> Optional[str]
@@ -77,11 +95,24 @@ class DirectoryAudit(Entity):
77
95
  """
78
96
  return self.properties.get("resultReason", None)
79
97
 
98
+ @property
99
+ def target_resources(self):
100
+ # type: () -> Optional[str]
101
+ """
102
+ Indicates information on which resource was changed due to the activity. Target Resource Type can be User,
103
+ Device, Directory, App, Role, Group, Policy or Other. Supports $filter (eq) for id and displayName;
104
+ and $filter (startswith) for displayName.
105
+ """
106
+ return self.properties.get(
107
+ "targetResources", ClientValueCollection(TargetResource)
108
+ )
109
+
80
110
  def get_property(self, name, default_value=None):
81
111
  if default_value is None:
82
112
  property_mapping = {
83
113
  "activityDateTime": self.activity_datetime,
84
114
  "initiatedBy": self.initiated_by,
115
+ "targetResources": self.target_resources,
85
116
  }
86
117
  default_value = property_mapping.get(name, None)
87
118
  return super(DirectoryAudit, self).get_property(name, default_value)
@@ -3,8 +3,12 @@ from typing import Optional
3
3
 
4
4
  from office365.directory.audit.signins.location import SignInLocation
5
5
  from office365.directory.audit.signins.status import SignInStatus
6
+ from office365.directory.policies.applied_conditional_access import (
7
+ AppliedConditionalAccessPolicy,
8
+ )
6
9
  from office365.entity import Entity
7
10
  from office365.intune.devices.detail import DeviceDetail
11
+ from office365.runtime.client_value_collection import ClientValueCollection
8
12
 
9
13
 
10
14
  class SignIn(Entity):
@@ -24,6 +28,15 @@ class SignIn(Entity):
24
28
  """Unique GUID representing the app ID in the Azure Active Directory."""
25
29
  return self.properties.get("appId", None)
26
30
 
31
+ @property
32
+ def applied_conditional_access_policies(self):
33
+ # type: () -> Optional[str]
34
+ """Provides a list of conditional access policies that the corresponding sign-in activity triggers."""
35
+ return self.properties.get(
36
+ "appliedConditionalAccessPolicies",
37
+ ClientValueCollection(AppliedConditionalAccessPolicy),
38
+ )
39
+
27
40
  @property
28
41
  def client_app_used(self):
29
42
  # type: () -> Optional[str]
@@ -122,6 +135,7 @@ class SignIn(Entity):
122
135
  def get_property(self, name, default_value=None):
123
136
  if default_value is None:
124
137
  property_mapping = {
138
+ "appliedConditionalAccessPolicies": self.applied_conditional_access_policies,
125
139
  "createdDateTime": self.created_datetime,
126
140
  "deviceDetail": self.device_detail,
127
141
  }
@@ -0,0 +1,5 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class TargetResource(ClientValue):
5
+ """Represents target resource types associated with audit activity."""
@@ -5,7 +5,11 @@ from office365.runtime.client_value import ClientValue
5
5
 
6
6
 
7
7
  class AuthenticationConditions(ClientValue):
8
- """"""
8
+ """The conditions on which an authenticationEventListener should trigger."""
9
9
 
10
10
  def __init__(self, applications=AuthenticationConditionsApplications()):
11
+ """
12
+ :parm AuthenticationConditionsApplications applications: Applications which trigger a custom authentication
13
+ extension.
14
+ """
11
15
  self.applications = applications
@@ -1,3 +1,6 @@
1
+ from datetime import datetime
2
+ from typing import Optional
3
+
1
4
  from office365.entity import Entity
2
5
 
3
6
 
@@ -7,3 +10,39 @@ class DataPolicyOperation(Entity):
7
10
  an operation. For example, a company administrator can submit a data policy operation request to export an
8
11
  employee's company data, and then later track that request.
9
12
  """
13
+
14
+ @property
15
+ def completed_datetime(self):
16
+ # type: () -> datetime
17
+ """Represents when the request for this data policy operation was completed"""
18
+ return self.properties.get("completedDateTime", datetime.min)
19
+
20
+ @property
21
+ def progress(self):
22
+ # type: () -> Optional[float]
23
+ """Specifies the progress of an operation."""
24
+ return self.properties.get("progress", None)
25
+
26
+ @property
27
+ def status(self):
28
+ # type: () -> Optional[str]
29
+ """Possible values are: notStarted, running, complete, failed, unknownFutureValue."""
30
+ return self.properties.get("status", None)
31
+
32
+ @property
33
+ def storage_location(self):
34
+ # type: () -> Optional[str]
35
+ """The URL location to where data is being exported for export requests."""
36
+ return self.properties.get("storageLocation", None)
37
+
38
+ @property
39
+ def submitted_datetime(self):
40
+ # type: () -> datetime
41
+ """Represents when the request for this data operation was submitted"""
42
+ return self.properties.get("submittedDateTime", datetime.min)
43
+
44
+ @property
45
+ def user_id(self):
46
+ # type: () -> Optional[str]
47
+ """The id for the user on whom the operation is performed."""
48
+ return self.properties.get("userId", None)
@@ -4,6 +4,7 @@ from office365.directory.custom_security_attribute_definition import (
4
4
  )
5
5
  from office365.directory.device_local_credential_info import DeviceLocalCredentialInfo
6
6
  from office365.directory.object_collection import DirectoryObjectCollection
7
+ from office365.directory.subscriptions.company import CompanySubscription
7
8
  from office365.entity import Entity
8
9
  from office365.entity_collection import EntityCollection
9
10
  from office365.runtime.paths.resource_path import ResourcePath
@@ -50,6 +51,18 @@ class Directory(Entity):
50
51
  ),
51
52
  )
52
53
 
54
+ @property
55
+ def subscriptions(self):
56
+ """List of commercial subscriptions that an organization acquired."""
57
+ return self.properties.get(
58
+ "subscriptions",
59
+ EntityCollection(
60
+ self.context,
61
+ CompanySubscription,
62
+ ResourcePath("subscriptions", self.resource_path),
63
+ ),
64
+ )
65
+
53
66
  def deleted_items(self, entity_type=None):
54
67
  """Recently deleted items. Read-only. Nullable."""
55
68
  if entity_type:
@@ -0,0 +1,29 @@
1
+ from office365.directory.identitygovernance.accessreview.stages import (
2
+ AccessReviewStageCollection,
3
+ )
4
+ from office365.entity import Entity
5
+ from office365.runtime.paths.resource_path import ResourcePath
6
+
7
+
8
+ class AccessReviewInstance(Entity):
9
+ """
10
+ Represents a Microsoft Entra access review recurrence. If the parent accessReviewScheduleDefinition is a
11
+ recurring access review, instances represent each recurrence. A review that does not recur will have exactly
12
+ one instance. Instances also represent each unique group being reviewed in the schedule definition.
13
+ If a schedule definition reviews multiple groups, each group will have a unique instance for each recurrence.
14
+
15
+ Every accessReviewInstance contains a list of decisions that reviewers can take action on.
16
+ There is one decision per identity being reviewed.
17
+ """
18
+
19
+ @property
20
+ def stages(self):
21
+ # type: () -> AccessReviewStageCollection
22
+ """If the instance has multiple stages, this returns the collection of stages.
23
+ A new stage will only be created when the previous stage ends"""
24
+ return self.properties.get(
25
+ "stages",
26
+ AccessReviewStageCollection(
27
+ self.context, ResourcePath("stages", self.resource_path)
28
+ ),
29
+ )
@@ -0,0 +1,13 @@
1
+ from office365.entity import Entity
2
+
3
+
4
+ class AccessReviewStage(Entity):
5
+ """
6
+ Represents a stage of a Microsoft Entra access review. If the parent accessReviewScheduleDefinition has defined
7
+ the stageSettings property, the accessReviewInstance is comprised of up to three subsequent stages.
8
+ Each stage may have a different set of reviewers who can act on the stage decisions, and settings determining
9
+ which decisions pass from stage to stage.
10
+
11
+ Every accessReviewStage contains a list of decision items for reviewers.
12
+ There's only one decision per identity being reviewed.
13
+ """
@@ -0,0 +1,11 @@
1
+ from office365.directory.identitygovernance.accessreview.stage import AccessReviewStage
2
+ from office365.entity_collection import EntityCollection
3
+
4
+
5
+ class AccessReviewStageCollection(EntityCollection[AccessReviewStage]):
6
+ """AccessReviewStage collection"""
7
+
8
+ def __init__(self, context, resource_path=None):
9
+ super(AccessReviewStageCollection, self).__init__(
10
+ context, AccessReviewStage, resource_path
11
+ )
@@ -56,3 +56,12 @@ class AppConsentRequest(Entity):
56
56
  self.context, ResourcePath("userConsentRequests", self.resource_path)
57
57
  ),
58
58
  )
59
+
60
+ def get_property(self, name, default_value=None):
61
+ if default_value is None:
62
+ property_mapping = {
63
+ "pendingScopes": self.pending_scopes,
64
+ "userConsentRequests": self.user_consent_requests,
65
+ }
66
+ default_value = property_mapping.get(name, None)
67
+ return super(AppConsentRequest, self).get_property(name, default_value)
@@ -1,5 +1,5 @@
1
1
  from office365.directory.identitygovernance.privilegedaccess.approval import Approval
2
- from office365.directory.identitygovernance.privilegedaccess.group_assignment_schedule_instance import (
2
+ from office365.directory.identitygovernance.privilegedaccess.schedule.group_assignment_instance import (
3
3
  PrivilegedAccessGroupAssignmentScheduleInstance,
4
4
  )
5
5
  from office365.entity import Entity
@@ -1,4 +1,4 @@
1
- from office365.directory.identitygovernance.privilegedaccess.schedule_instance import (
1
+ from office365.directory.identitygovernance.privilegedaccess.schedule.instance import (
2
2
  PrivilegedAccessScheduleInstance,
3
3
  )
4
4
 
@@ -0,0 +1,6 @@
1
+ from office365.entity import Entity
2
+
3
+
4
+ class PrivilegedAccessSchedule(Entity):
5
+ """An abstract type that exposes properties relating to the schedule of assigned and eligible membership and
6
+ ownership to groups that are governed by PIM."""
@@ -1,3 +1,7 @@
1
+ from datetime import datetime
2
+ from typing import Optional
3
+
4
+ from office365.directory.insights.resource_reference import ResourceReference
1
5
  from office365.entity import Entity
2
6
  from office365.runtime.paths.resource_path import ResourcePath
3
7
 
@@ -8,6 +12,18 @@ class Trending(Entity):
8
12
  OneDrive files, and files stored on SharePoint team sites can trend around the user.
9
13
  """
10
14
 
15
+ @property
16
+ def last_modified_datetime(self):
17
+ # type: () -> Optional[datetime]
18
+ """Gets date and time the item was last modified."""
19
+ return self.properties.get("lastModifiedDateTime", datetime.min)
20
+
21
+ @property
22
+ def resource_reference(self):
23
+ # type: () -> ResourceReference
24
+ """Reference properties of the trending document, such as the url and type of the document."""
25
+ return self.properties.get("resourceReference", ResourceReference())
26
+
11
27
  @property
12
28
  def resource(self):
13
29
  """Used for navigating to the trending document."""
@@ -15,3 +31,12 @@ class Trending(Entity):
15
31
  "resource",
16
32
  Entity(self.context, ResourcePath("resource", self.resource_path)),
17
33
  )
34
+
35
+ def get_property(self, name, default_value=None):
36
+ if default_value is None:
37
+ property_mapping = {
38
+ "lastModifiedDateTime": self.last_modified_datetime,
39
+ "resourceReference": self.resource_reference,
40
+ }
41
+ default_value = property_mapping.get(name, None)
42
+ return super(Trending, self).get_property(name, default_value)
@@ -18,8 +18,8 @@ class LicenseAssignmentState(ClientValue):
18
18
  assigned_by_group=None,
19
19
  disabled_plans=None,
20
20
  error=None,
21
- lastUpdatedDateTime=None,
22
- skuId=None,
21
+ last_updated_datetime=None,
22
+ sku_id=None,
23
23
  state=None,
24
24
  ):
25
25
  """
@@ -31,13 +31,13 @@ class LicenseAssignmentState(ClientValue):
31
31
  The possible values are CountViolation, MutuallyExclusiveViolation, DependencyViolation,
32
32
  ProhibitedInUsageLocationViolation, UniquenessViolation, and Other.
33
33
  For more information on how to identify and resolve license assignment errors, see here.
34
- :param str skuId: The unique identifier for the SKU. Read-Only.
34
+ :param str sku_id: The unique identifier for the SKU. Read-Only.
35
35
  :param str state: Indicate the current state of this assignment. Read-Only.
36
36
  The possible values are Active, ActiveWithError, Disabled, and Error.
37
37
  """
38
38
  self.assignedByGroup = assigned_by_group
39
39
  self.disabledPlans = StringCollection(disabled_plans)
40
40
  self.error = error
41
- self.lastUpdatedDateTime = lastUpdatedDateTime
42
- self.skuId = skuId
41
+ self.lastUpdatedDateTime = last_updated_datetime
42
+ self.skuId = sku_id
43
43
  self.state = state
@@ -34,3 +34,9 @@ class LicenseDetails(Entity):
34
34
  for example: "AAD_Premium". Read-only
35
35
  """
36
36
  return self.properties.get("skuPartNumber", None)
37
+
38
+ def get_property(self, name, default_value=None):
39
+ if default_value is None:
40
+ property_mapping = {"servicePlans": self.service_plans}
41
+ default_value = property_mapping.get(name, None)
42
+ return super(LicenseDetails, self).get_property(name, default_value)
@@ -0,0 +1,8 @@
1
+ from office365.entity import Entity
2
+
3
+
4
+ class ScopedRoleMembership(Entity):
5
+ """A scoped-role membership describes a user's membership of a directory role that is further
6
+ scoped to an Administrative Unit. Scoped-role membership provides a mechanism to allow a tenant-wide company
7
+ administrator to delegate administrative privileges to a user, to manage users and groups in a subset
8
+ of the organization."""
@@ -0,0 +1,31 @@
1
+ from office365.runtime.client_value import ClientValue
2
+ from office365.runtime.types.collections import StringCollection
3
+
4
+
5
+ class AppliedConditionalAccessPolicy(ClientValue):
6
+ """Indicates the attributes related to applied conditional access policy or policies that are triggered
7
+ by a sign-in activity.
8
+
9
+ The data in this object is returned only for callers with privileges to read conditional access data.
10
+ For more information, see Permissions for viewing applied conditional access (CA) policies in sign-ins.
11
+ """
12
+
13
+ def __init__(
14
+ self,
15
+ display_name=None,
16
+ enforced_grant_controls=None,
17
+ enforced_session_controls=None,
18
+ id_=None,
19
+ result=None,
20
+ ):
21
+ """
22
+ :param str display_name: Refers to the name of the conditional access policy
23
+ :param list[str] enforced_grant_controls: Refers to the grant controls enforced by the conditional access policy
24
+ :param list[str] enforced_session_controls: Refers to the session controls enforced by the conditional
25
+ access policy
26
+ """
27
+ self.displayName = display_name
28
+ self.enforcedGrantControls = StringCollection(enforced_grant_controls)
29
+ self.enforcedSessionControls = StringCollection(enforced_session_controls)
30
+ self.id = id_
31
+ self.result = result
@@ -1,4 +1,6 @@
1
+ from office365.directory.object_collection import DirectoryObjectCollection
1
2
  from office365.entity import Entity
3
+ from office365.runtime.paths.resource_path import ResourcePath
2
4
 
3
5
 
4
6
  class FeatureRolloutPolicy(Entity):
@@ -14,3 +16,25 @@ class FeatureRolloutPolicy(Entity):
14
16
  - The appliesTo field only supports groups.
15
17
  - Dynamic groups and nested groups are not supported.
16
18
  """
19
+
20
+ @property
21
+ def applies_to(self):
22
+ # type: () -> DirectoryObjectCollection
23
+ """
24
+ Specifies a list of directoryObject resources that feature is enabled for.
25
+ """
26
+ return self.properties.get(
27
+ "appliesTo",
28
+ DirectoryObjectCollection(
29
+ self.context,
30
+ ResourcePath("appliesTo", self.resource_path),
31
+ ),
32
+ )
33
+
34
+ def get_property(self, name, default_value=None):
35
+ if default_value is None:
36
+ property_mapping = {
37
+ "appliesTo": self.applies_to,
38
+ }
39
+ default_value = property_mapping.get(name, None)
40
+ return super(FeatureRolloutPolicy, self).get_property(name, default_value)