Office365-REST-Python-Client 2.5.5__py3-none-any.whl → 2.5.7__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 (270) hide show
  1. {Office365_REST_Python_Client-2.5.5.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/METADATA +6 -6
  2. {Office365_REST_Python_Client-2.5.5.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/RECORD +269 -222
  3. office365/booking/virtualevents/__init__.py +0 -0
  4. office365/booking/virtualevents/root.py +5 -0
  5. office365/communications/calls/participant.py +4 -5
  6. office365/directory/administrative_unit.py +9 -2
  7. office365/directory/applications/application.py +3 -3
  8. office365/directory/applications/roles/assignment_collection.py +1 -1
  9. office365/directory/applications/roles/collection.py +6 -2
  10. office365/directory/applications/roles/role.py +1 -1
  11. office365/directory/audit/provisioning/object_summary.py +30 -1
  12. office365/directory/authentication/method_configuration.py +9 -0
  13. office365/directory/authentication/method_mode_detail.py +8 -0
  14. office365/directory/authentication/method_target.py +5 -0
  15. office365/directory/authentication/methods/fido.py +8 -0
  16. office365/directory/authentication/methods/password.py +23 -0
  17. office365/directory/authentication/strength_root.py +5 -0
  18. office365/directory/certificates/auth_configuration.py +1 -3
  19. office365/directory/custom_security_attribute_definition.py +7 -0
  20. office365/directory/device_local_credential_info.py +6 -0
  21. office365/directory/directory.py +40 -12
  22. office365/directory/groups/group.py +2 -6
  23. office365/directory/identities/conditional_access_root.py +10 -1
  24. office365/directory/identities/container.py +3 -9
  25. office365/directory/identities/providers/builtin_identity.py +3 -2
  26. office365/directory/identities/providers/saml_or_wsfed.py +4 -5
  27. office365/directory/identitygovernance/appconsent/request_collection.py +1 -1
  28. office365/directory/identitygovernance/governance.py +14 -3
  29. office365/directory/identitygovernance/privilegedaccess/__init__.py +0 -0
  30. office365/directory/identitygovernance/privilegedaccess/root.py +5 -0
  31. office365/directory/identitygovernance/termsofuse/agreement_acceptance.py +8 -0
  32. office365/directory/identitygovernance/userconsent/request_collection.py +1 -1
  33. office365/directory/insights/resource_reference.py +1 -1
  34. office365/directory/key_credential.py +3 -0
  35. office365/directory/licenses/assignment_state.py +26 -2
  36. office365/directory/licenses/details.py +4 -3
  37. office365/directory/licenses/subscribed_sku.py +8 -10
  38. office365/directory/object_collection.py +40 -25
  39. office365/directory/password_credential.py +3 -0
  40. office365/directory/permissions/default_user_role.py +5 -0
  41. office365/directory/permissions/grants/condition_set.py +4 -2
  42. office365/directory/permissions/grants/oauth2.py +7 -10
  43. office365/directory/policies/authorization.py +50 -3
  44. office365/directory/policies/device_registration.py +6 -0
  45. office365/directory/policies/permission_grant.py +2 -0
  46. office365/directory/policies/root.py +13 -0
  47. office365/directory/profile_photo.py +6 -6
  48. office365/directory/protection/riskyusers/risky_user.py +4 -4
  49. office365/directory/rolemanagement/resource_action.py +10 -0
  50. office365/directory/rolemanagement/role_permission.py +10 -0
  51. office365/directory/security/alerts/alert.py +5 -7
  52. office365/directory/security/attacksimulations/landing_page.py +5 -0
  53. office365/directory/security/attacksimulations/operation.py +5 -0
  54. office365/directory/security/attacksimulations/report.py +8 -1
  55. office365/directory/security/attacksimulations/root.py +33 -0
  56. office365/directory/security/attacksimulations/users/__init__.py +0 -0
  57. office365/directory/security/attacksimulations/users/details.py +5 -0
  58. office365/directory/security/hunting_query_results.py +5 -0
  59. office365/directory/security/incidents/incident.py +8 -13
  60. office365/directory/security/security.py +20 -3
  61. office365/directory/security/threatintelligence/article_indicator.py +7 -0
  62. office365/directory/serviceprincipals/service_principal.py +6 -12
  63. office365/directory/synchronization/schema.py +16 -0
  64. office365/directory/synchronization/synchronization.py +2 -0
  65. office365/directory/users/activities/history_item.py +3 -2
  66. office365/directory/users/user.py +60 -10
  67. office365/entity_collection.py +3 -2
  68. office365/graph_client.py +58 -30
  69. office365/intune/audit/event.py +1 -3
  70. office365/intune/audit/event_collection.py +1 -1
  71. office365/intune/devices/alternative_security_id.py +4 -0
  72. office365/intune/devices/collection.py +57 -0
  73. office365/intune/devices/device.py +38 -10
  74. office365/intune/devices/management/management.py +12 -0
  75. office365/intune/organizations/organization.py +1 -0
  76. office365/onedrive/analytics/item_activity_stat.py +9 -0
  77. office365/onedrive/analytics/item_analytics.py +1 -0
  78. office365/onedrive/contenttypes/content_type.py +4 -12
  79. office365/onedrive/driveitems/driveItem.py +76 -7
  80. office365/onedrive/files/hashes.py +5 -0
  81. office365/onedrive/lists/collection.py +2 -2
  82. office365/onedrive/lists/list.py +1 -1
  83. office365/onedrive/operations/long_running.py +6 -6
  84. office365/onedrive/operations/rich_long_running.py +4 -3
  85. office365/onedrive/permissions/collection.py +1 -14
  86. office365/onedrive/sharepoint_settings.py +6 -6
  87. office365/onedrive/sitepages/__init__.py +0 -0
  88. office365/onedrive/sitepages/base.py +29 -0
  89. office365/onedrive/sitepages/canvas_layout.py +43 -0
  90. office365/onedrive/sitepages/collection.py +32 -0
  91. office365/onedrive/sitepages/horizontal_section.py +23 -0
  92. office365/onedrive/sitepages/horizontal_section_column.py +27 -0
  93. office365/onedrive/sitepages/site_page.py +116 -0
  94. office365/onedrive/sitepages/title_area.py +13 -0
  95. office365/onedrive/sitepages/vertical_section.py +27 -0
  96. office365/onedrive/sitepages/web_part.py +5 -0
  97. office365/onedrive/sites/site.py +10 -0
  98. office365/onedrive/sites/sites_with_root.py +1 -3
  99. office365/onedrive/termstore/store.py +2 -4
  100. office365/onedrive/termstore/terms/collection.py +1 -2
  101. office365/onedrive/workbooks/charts/data_labels.py +13 -1
  102. office365/onedrive/workbooks/filter.py +9 -0
  103. office365/onedrive/workbooks/filter_criteria.py +5 -0
  104. office365/onedrive/workbooks/functions/functions.py +6 -3
  105. office365/onedrive/workbooks/functions/result.py +2 -0
  106. office365/onedrive/workbooks/operations/workbook.py +7 -10
  107. office365/onedrive/workbooks/tables/pivot_table.py +9 -9
  108. office365/onedrive/workbooks/tables/sort.py +5 -0
  109. office365/onedrive/workbooks/tables/table.py +57 -0
  110. office365/onedrive/workbooks/worksheets/collection.py +0 -6
  111. office365/onedrive/workbooks/worksheets/protection.py +22 -1
  112. office365/onedrive/workbooks/worksheets/protection_options.py +7 -0
  113. office365/outlook/calendar/calendar.py +1 -3
  114. office365/outlook/calendar/events/event.py +45 -0
  115. office365/outlook/calendar/permissions/permission.py +7 -7
  116. office365/outlook/calendar/place.py +5 -3
  117. office365/outlook/calendar/response_status.py +11 -0
  118. office365/outlook/calendar/rooms/room.py +14 -0
  119. office365/outlook/mail/attachments/collection.py +6 -1
  120. office365/outlook/mail/automatic_replies_mailtips.py +5 -0
  121. office365/outlook/mail/conversation.py +1 -3
  122. office365/outlook/mail/folders/folder.py +1 -3
  123. office365/outlook/mail/messages/message.py +1 -1
  124. office365/outlook/mail/tips.py +17 -0
  125. office365/planner/plans/plan.py +11 -1
  126. office365/reports/root.py +83 -4
  127. office365/runtime/auth/authentication_context.py +12 -2
  128. office365/runtime/auth/providers/acs_token_provider.py +10 -7
  129. office365/runtime/auth/sts_profile.py +0 -1
  130. office365/runtime/client_object.py +18 -14
  131. office365/runtime/client_object_collection.py +8 -23
  132. office365/runtime/client_request_exception.py +1 -3
  133. office365/runtime/client_result.py +11 -14
  134. office365/runtime/client_runtime_context.py +11 -21
  135. office365/runtime/odata/json_format.py +7 -9
  136. office365/runtime/odata/request.py +12 -2
  137. office365/runtime/odata/v3/batch_request.py +7 -15
  138. office365/runtime/odata/v4/batch_request.py +13 -21
  139. office365/runtime/queries/upload_session.py +5 -0
  140. office365/runtime/types/event_handler.py +1 -1
  141. office365/search/entity.py +3 -2
  142. office365/sharepoint/activities/facets/delete.py +1 -1
  143. office365/sharepoint/activities/tracked_item_service.py +2 -3
  144. office365/sharepoint/administration/web_application.py +8 -7
  145. office365/sharepoint/alerts/collection.py +2 -1
  146. office365/sharepoint/attachments/attachment.py +3 -9
  147. office365/sharepoint/audit/audit.py +3 -2
  148. office365/sharepoint/changes/alert.py +4 -3
  149. office365/sharepoint/changes/collection.py +7 -10
  150. office365/sharepoint/changes/content_type.py +4 -4
  151. office365/sharepoint/changes/field.py +4 -5
  152. office365/sharepoint/changes/item.py +34 -7
  153. office365/sharepoint/changes/list.py +4 -4
  154. office365/sharepoint/changes/user.py +5 -6
  155. office365/sharepoint/client_context.py +4 -2
  156. office365/sharepoint/clientsidecomponent/component_context_info.py +4 -3
  157. office365/sharepoint/contentcenter/machinelearning/enabled.py +4 -3
  158. office365/sharepoint/contentcenter/machinelearning/hub.py +6 -6
  159. office365/sharepoint/contentcenter/machinelearning/models/collection.py +1 -1
  160. office365/sharepoint/contenttypes/content_type.py +13 -1
  161. office365/sharepoint/contenttypes/fieldlinks/collection.py +5 -7
  162. office365/sharepoint/contenttypes/fieldlinks/field_link.py +14 -22
  163. office365/sharepoint/directory/helper.py +2 -0
  164. office365/sharepoint/entity.py +12 -5
  165. office365/sharepoint/entity_collection.py +1 -3
  166. office365/sharepoint/eventreceivers/definition.py +8 -12
  167. office365/sharepoint/features/collection.py +1 -2
  168. office365/sharepoint/features/definitions/definition.py +6 -3
  169. office365/sharepoint/fields/calculated.py +8 -14
  170. office365/sharepoint/fields/collection.py +46 -13
  171. office365/sharepoint/fields/computed.py +4 -5
  172. office365/sharepoint/fields/currency.py +7 -11
  173. office365/sharepoint/fields/date_time.py +4 -8
  174. office365/sharepoint/fields/field.py +6 -16
  175. office365/sharepoint/fields/lookup.py +11 -9
  176. office365/sharepoint/fields/multi_choice.py +8 -12
  177. office365/sharepoint/fields/multi_line_text.py +10 -14
  178. office365/sharepoint/fields/number.py +13 -26
  179. office365/sharepoint/fields/rating_scale.py +6 -10
  180. office365/sharepoint/fields/related_field.py +10 -17
  181. office365/sharepoint/fields/url.py +4 -5
  182. office365/sharepoint/fields/user.py +10 -9
  183. office365/sharepoint/files/collection.py +17 -15
  184. office365/sharepoint/files/file.py +30 -23
  185. office365/sharepoint/folders/collection.py +22 -5
  186. office365/sharepoint/folders/coloring.py +11 -9
  187. office365/sharepoint/folders/coloring_information.py +38 -0
  188. office365/sharepoint/folders/folder.py +23 -25
  189. office365/sharepoint/likes/liked_by_information.py +7 -10
  190. office365/sharepoint/likes/user_entity.py +6 -8
  191. office365/sharepoint/listitems/form_update_value.py +17 -1
  192. office365/sharepoint/listitems/listitem.py +2 -2
  193. office365/sharepoint/lists/bloom_filter.py +5 -7
  194. office365/sharepoint/lists/creatables_info.py +5 -6
  195. office365/sharepoint/lists/list.py +24 -9
  196. office365/sharepoint/lists/template.py +7 -4
  197. office365/sharepoint/lists/template_collection.py +2 -4
  198. office365/sharepoint/marketplace/app_metadata.py +14 -23
  199. office365/sharepoint/marketplace/sitecollection/appcatalog/allowed_item.py +6 -8
  200. office365/sharepoint/migrationcenter/deploy_status.py +5 -0
  201. office365/sharepoint/migrationcenter/service/performance/__init__.py +0 -0
  202. office365/sharepoint/migrationcenter/service/performance/dashboard_data.py +9 -0
  203. office365/sharepoint/migrationcenter/service/performance/data.py +7 -0
  204. office365/sharepoint/migrationcenter/service/performance/entity_data.py +5 -0
  205. office365/sharepoint/navigation/node.py +5 -8
  206. office365/sharepoint/permissions/irm/effective_settings.py +6 -8
  207. office365/sharepoint/permissions/irm/file_settings.py +8 -6
  208. office365/sharepoint/permissions/irm/settings.py +25 -43
  209. office365/sharepoint/portal/groups/site_manager.py +6 -7
  210. office365/sharepoint/principal/principal.py +2 -4
  211. office365/sharepoint/publishing/embed_data_v1.py +8 -15
  212. office365/sharepoint/publishing/pages/campaign_publication.py +4 -3
  213. office365/sharepoint/publishing/primary_city_time.py +8 -9
  214. office365/sharepoint/publishing/video/service_discoverer.py +4 -3
  215. office365/sharepoint/pushnotifications/subscriber.py +11 -15
  216. office365/sharepoint/recyclebin/item.py +107 -7
  217. office365/sharepoint/sharing/information.py +9 -0
  218. office365/sharepoint/sharing/link_info.py +6 -0
  219. office365/sharepoint/sharing/object_sharing_settings.py +24 -46
  220. office365/sharepoint/sharing/permission_collection.py +18 -0
  221. office365/sharepoint/sharing/permission_information.py +5 -5
  222. office365/sharepoint/sharing/result.py +1 -0
  223. office365/sharepoint/sitedesigns/run.py +4 -3
  224. office365/sharepoint/sites/script_safe_domain.py +5 -0
  225. office365/sharepoint/sites/site.py +17 -20
  226. office365/sharepoint/taxonomy/field.py +32 -21
  227. office365/sharepoint/taxonomy/field_value.py +1 -1
  228. office365/sharepoint/taxonomy/groups/group.py +12 -1
  229. office365/sharepoint/taxonomy/sets/set.py +6 -0
  230. office365/sharepoint/taxonomy/stores/store.py +4 -2
  231. office365/sharepoint/teams/channel.py +6 -6
  232. office365/sharepoint/tenant/administration/endpoints.py +4 -3
  233. office365/sharepoint/tenant/administration/hubsites/properties.py +4 -5
  234. office365/sharepoint/tenant/administration/powerapps/__init__.py +0 -0
  235. office365/sharepoint/tenant/administration/powerapps/environment_context.py +8 -0
  236. office365/sharepoint/tenant/administration/sites/properties.py +0 -1
  237. office365/sharepoint/tenant/administration/spo_operation.py +4 -4
  238. office365/sharepoint/tenant/administration/tenant.py +1 -0
  239. office365/sharepoint/tenant/insights/report.py +11 -0
  240. office365/sharepoint/tenant/insights/report_manager.py +5 -0
  241. office365/sharepoint/tenant/insights/report_metadata.py +5 -0
  242. office365/sharepoint/tenant/settings.py +4 -3
  243. office365/sharepoint/translation/sync_translator.py +3 -2
  244. office365/sharepoint/ui/applicationpages/peoplepicker/entity_information.py +4 -4
  245. office365/sharepoint/usercustomactions/action.py +12 -20
  246. office365/sharepoint/userprofiles/followed_content.py +6 -10
  247. office365/sharepoint/userprofiles/people_manager.py +0 -1
  248. office365/sharepoint/userprofiles/person_properties.py +14 -30
  249. office365/sharepoint/userprofiles/personal_cache.py +4 -3
  250. office365/sharepoint/userprofiles/properties_for_user.py +4 -5
  251. office365/sharepoint/userprofiles/sharedwithme/document.py +12 -21
  252. office365/sharepoint/utilities/move_copy_util.py +19 -19
  253. office365/sharepoint/utilities/upload_status.py +7 -10
  254. office365/sharepoint/views/field_collection.py +9 -14
  255. office365/sharepoint/views/view.py +43 -64
  256. office365/sharepoint/webhooks/subscription.py +11 -19
  257. office365/sharepoint/webparts/webpart.py +3 -1
  258. office365/sharepoint/webs/information_collection.py +1 -1
  259. office365/sharepoint/webs/modernize_homepage_result.py +4 -3
  260. office365/sharepoint/webs/regional_settings.py +79 -16
  261. office365/sharepoint/webs/template.py +3 -5
  262. office365/sharepoint/webs/web.py +24 -25
  263. office365/teams/apps/catalog.py +1 -0
  264. office365/teams/chats/chat.py +4 -0
  265. office365/teams/operations/async_operation.py +5 -7
  266. office365/teams/schedule/schedule.py +6 -2
  267. office365/runtime/paths/item.py +0 -8
  268. {Office365_REST_Python_Client-2.5.5.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/LICENSE +0 -0
  269. {Office365_REST_Python_Client-2.5.5.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/WHEEL +0 -0
  270. {Office365_REST_Python_Client-2.5.5.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/top_level.txt +0 -0
File without changes
@@ -0,0 +1,5 @@
1
+ from office365.entity import Entity
2
+
3
+
4
+ class VirtualEventsRoot(Entity):
5
+ """ """
@@ -1,3 +1,5 @@
1
+ from typing import Optional
2
+
1
3
  from office365.communications.calls.invitation_participant_info import (
2
4
  InvitationParticipantInfo,
3
5
  )
@@ -68,9 +70,6 @@ class Participant(Entity):
68
70
 
69
71
  @property
70
72
  def metadata(self):
71
- """
72
- A blob of data provided by the participant in the roster.
73
-
74
- :rtype: str
75
- """
73
+ # type: () -> Optional[str]
74
+ """A blob of data provided by the participant in the roster."""
76
75
  return self.properties.get("metadata", None)
@@ -21,10 +21,17 @@ class AdministrativeUnit(DirectoryObject):
21
21
  return self.properties.get("displayName", None)
22
22
 
23
23
  @property
24
- def members(self):
24
+ def visibility(self):
25
25
  """
26
- Users and groups that are members of this administrative unit
26
+ Controls whether the administrative unit and its members are hidden or public. Can be set to HiddenMembership.
27
+ If not set (value is null), the default behavior is public. When set to HiddenMembership, only members of
28
+ the administrative unit can list other members of the administrative unit.
27
29
  """
30
+ return self.properties.get("visibility", None)
31
+
32
+ @property
33
+ def members(self):
34
+ """Users and groups that are members of this administrative unit"""
28
35
  from office365.directory.object_collection import DirectoryObjectCollection
29
36
 
30
37
  return self.properties.get(
@@ -252,9 +252,7 @@ class Application(DirectoryObject):
252
252
 
253
253
  @property
254
254
  def public_client(self):
255
- """
256
- Specifies settings for installed clients such as desktop or mobile devices.
257
- """
255
+ """Specifies settings for installed clients such as desktop or mobile devices."""
258
256
  return self.properties.get("publicClient", PublicClientApplication())
259
257
 
260
258
  @property
@@ -269,6 +267,7 @@ class Application(DirectoryObject):
269
267
 
270
268
  @property
271
269
  def created_on_behalf_of(self):
270
+ # type: () -> DirectoryObject
272
271
  """"""
273
272
  return self.properties.get(
274
273
  "createdOnBehalfOf",
@@ -279,6 +278,7 @@ class Application(DirectoryObject):
279
278
 
280
279
  @property
281
280
  def owners(self):
281
+ # type: () -> DirectoryObjectCollection
282
282
  """Directory objects that are owners of the application."""
283
283
  return self.properties.get(
284
284
  "owners",
@@ -2,7 +2,7 @@ from office365.directory.applications.roles.assignment import AppRoleAssignment
2
2
  from office365.entity_collection import EntityCollection
3
3
 
4
4
 
5
- class AppRoleAssignmentCollection(EntityCollection):
5
+ class AppRoleAssignmentCollection(EntityCollection[AppRoleAssignment]):
6
6
  def __init__(self, context, resource_path=None):
7
7
  super(AppRoleAssignmentCollection, self).__init__(
8
8
  context, AppRoleAssignment, resource_path
@@ -8,6 +8,10 @@ class AppRoleCollection(ClientValueCollection[AppRole]):
8
8
  def __init__(self, initial_values=None):
9
9
  super(AppRoleCollection, self).__init__(AppRole, initial_values)
10
10
 
11
- def __getitem__(self, name):
11
+ def __getitem__(self, key):
12
12
  # type: (str) -> AppRole
13
- return next(iter([item for item in self._data if item.value == name]), None)
13
+ return self.get_by_value(key)
14
+
15
+ def get_by_value(self, value):
16
+ # type: (str) -> AppRole
17
+ return next(iter([item for item in self._data if item.value == value]), None)
@@ -38,4 +38,4 @@ class AppRole(ClientValue):
38
38
  return "{0} {1}".format(self.allowedMemberTypes, self.value)
39
39
 
40
40
  def __repr__(self):
41
- return "{0}".format(self.id)
41
+ return self.value or self.id or self.entity_type_name
@@ -1,3 +1,6 @@
1
+ from datetime import datetime
2
+ from typing import Optional
3
+
1
4
  from office365.directory.audit.provisioning.service_principal import (
2
5
  ProvisioningServicePrincipal,
3
6
  )
@@ -7,6 +10,29 @@ from office365.entity import Entity
7
10
  class ProvisioningObjectSummary(Entity):
8
11
  """Represents an action performed by the Azure AD Provisioning service and its associated properties."""
9
12
 
13
+ @property
14
+ def activity_datetime(self):
15
+ """Represents date and time information using ISO 8601 format and is always in UTC time."""
16
+ return self.properties.get("activityDateTime", datetime.min)
17
+
18
+ @property
19
+ def change_id(self):
20
+ # type: () -> Optional[str]
21
+ """Unique ID of this change in this cycle. Supports $filter (eq, contains)."""
22
+ return self.properties.get("changeId", None)
23
+
24
+ @property
25
+ def cycle_id(self):
26
+ # type: () -> Optional[str]
27
+ """Unique ID per job iteration. Supports $filter (eq, contains)."""
28
+ return self.properties.get("cycleId", None)
29
+
30
+ @property
31
+ def duration_in_milliseconds(self):
32
+ # type: () -> Optional[int]
33
+ """Indicates how long this provisioning action took to finish. Measured in milliseconds."""
34
+ return self.properties.get("durationInMilliseconds", None)
35
+
10
36
  @property
11
37
  def service_principal(self):
12
38
  """Represents the service principal used for provisioning."""
@@ -14,6 +40,9 @@ class ProvisioningObjectSummary(Entity):
14
40
 
15
41
  def get_property(self, name, default_value=None):
16
42
  if default_value is None:
17
- property_mapping = {"servicePrincipal": self.service_principal}
43
+ property_mapping = {
44
+ "activityDateTime": self.activity_datetime,
45
+ "servicePrincipal": self.service_principal,
46
+ }
18
47
  default_value = property_mapping.get(name, None)
19
48
  return super(ProvisioningObjectSummary, self).get_property(name, default_value)
@@ -0,0 +1,9 @@
1
+ from office365.entity import Entity
2
+
3
+
4
+ class AuthenticationMethodConfiguration(Entity):
5
+ """
6
+ This is an abstract type that represents the settings for each authentication method. It has the configuration
7
+ of whether a specific authentication method is enabled or disabled for the tenant and which users and groups
8
+ can register and use that method.
9
+ """
@@ -0,0 +1,8 @@
1
+ from office365.entity import Entity
2
+
3
+
4
+ class AuthenticationMethodModeDetail(Entity):
5
+ """
6
+ The details of the authenticationMethodModes objects that can be defined for the allowedCombinations property
7
+ of the authenticationstrengthpolicy.
8
+ """
@@ -0,0 +1,5 @@
1
+ from office365.entity import Entity
2
+
3
+
4
+ class AuthenticationMethodTarget(Entity):
5
+ """"""
@@ -1,5 +1,13 @@
1
+ from typing import Optional
2
+
1
3
  from office365.directory.authentication.methods.method import AuthenticationMethod
2
4
 
3
5
 
4
6
  class Fido2AuthenticationMethod(AuthenticationMethod):
5
7
  """Representation of a FIDO2 security key registered to a user. FIDO2 is a sign-in authentication method."""
8
+
9
+ @property
10
+ def model(self):
11
+ # type: () -> Optional[str]
12
+ """The manufacturer-assigned model of the FIDO2 security key."""
13
+ return self.properties.get("model", None)
@@ -1,6 +1,29 @@
1
+ from datetime import datetime
2
+ from typing import Optional
3
+
1
4
  from office365.directory.authentication.methods.method import AuthenticationMethod
2
5
 
3
6
 
4
7
  class PasswordAuthenticationMethod(AuthenticationMethod):
5
8
  """A representation of a user's password. For security, the password itself will never be returned in the object,
6
9
  but action can be taken to reset a password."""
10
+
11
+ @property
12
+ def created_datetime(self):
13
+ # type: () -> datetime
14
+ """The date and time when this password was last updated. This property is currently not populated."""
15
+ return self.properties.get("createdDateTime", datetime.min)
16
+
17
+ @property
18
+ def password(self):
19
+ # type: () -> Optional[str]
20
+ """For security, the password is always returned as null from a LIST or GET operation."""
21
+ return self.properties.get("password", None)
22
+
23
+ def get_property(self, name, default_value=None):
24
+ if default_value is None:
25
+ property_mapping = {"createdDateTime": self.created_datetime}
26
+ default_value = property_mapping.get(name, None)
27
+ return super(PasswordAuthenticationMethod, self).get_property(
28
+ name, default_value
29
+ )
@@ -0,0 +1,5 @@
1
+ from office365.entity import Entity
2
+
3
+
4
+ class AuthenticationStrengthRoot(Entity):
5
+ """The authenticationStrengthRoot resource is the entry point for the authentication strengths object model."""
@@ -20,9 +20,7 @@ class CertificateBasedAuthConfiguration(Entity):
20
20
 
21
21
  @property
22
22
  def certificate_authorities(self):
23
- """
24
- Collection of certificate authorities which creates a trusted certificate chain.
25
- """
23
+ """Collection of certificate authorities which creates a trusted certificate chain."""
26
24
  return self.properties.get(
27
25
  "certificateAuthorities", ClientValueCollection(CertificateAuthority)
28
26
  )
@@ -0,0 +1,7 @@
1
+ from office365.entity import Entity
2
+
3
+
4
+ class CustomSecurityAttributeDefinition(Entity):
5
+ """Represents the schema of a custom security attribute (key-value pair).
6
+ For example, the custom security attribute name, description, data type, and allowed values.
7
+ """
@@ -0,0 +1,6 @@
1
+ from office365.entity import Entity
2
+
3
+
4
+ class DeviceLocalCredentialInfo(Entity):
5
+ """Represents local administrator credential information for all device objects in Azure Active Directory
6
+ that are enabled with Local Admin Password Solution (LAPS)."""
@@ -1,4 +1,8 @@
1
1
  from office365.directory.administrative_unit import AdministrativeUnit
2
+ from office365.directory.custom_security_attribute_definition import (
3
+ CustomSecurityAttributeDefinition,
4
+ )
5
+ from office365.directory.device_local_credential_info import DeviceLocalCredentialInfo
2
6
  from office365.directory.object_collection import DirectoryObjectCollection
3
7
  from office365.entity import Entity
4
8
  from office365.entity_collection import EntityCollection
@@ -10,6 +14,42 @@ class Directory(Entity):
10
14
  "container". Deleted items will remain available to restore for up to 30 days. After 30 days, the items are
11
15
  permanently deleted."""
12
16
 
17
+ @property
18
+ def device_local_credentials(self):
19
+ """Conceptual container for user and group directory objects."""
20
+ return self.properties.get(
21
+ "deviceLocalCredentials",
22
+ EntityCollection(
23
+ self.context,
24
+ DeviceLocalCredentialInfo,
25
+ ResourcePath("deviceLocalCredentials", self.resource_path),
26
+ ),
27
+ )
28
+
29
+ @property
30
+ def administrative_units(self):
31
+ """Conceptual container for user and group directory objects."""
32
+ return self.properties.get(
33
+ "administrativeUnits",
34
+ EntityCollection(
35
+ self.context,
36
+ AdministrativeUnit,
37
+ ResourcePath("administrativeUnits", self.resource_path),
38
+ ),
39
+ )
40
+
41
+ @property
42
+ def custom_security_attribute_definitions(self):
43
+ """Conceptual container for customSecurityAttributeDefinition objects and their properties."""
44
+ return self.properties.get(
45
+ "customSecurityAttributeDefinitions",
46
+ EntityCollection(
47
+ self.context,
48
+ CustomSecurityAttributeDefinition,
49
+ ResourcePath("customSecurityAttributeDefinitions", self.resource_path),
50
+ ),
51
+ )
52
+
13
53
  def deleted_items(self, entity_type=None):
14
54
  """Recently deleted items. Read-only. Nullable."""
15
55
  if entity_type:
@@ -27,18 +67,6 @@ class Directory(Entity):
27
67
  ),
28
68
  )
29
69
 
30
- @property
31
- def administrative_units(self):
32
- """Conceptual container for user and group directory objects."""
33
- return self.properties.get(
34
- "administrativeUnits",
35
- EntityCollection(
36
- self.context,
37
- AdministrativeUnit,
38
- ResourcePath("administrativeUnits", self.resource_path),
39
- ),
40
- )
41
-
42
70
  @property
43
71
  def deleted_groups(self):
44
72
  """Recently deleted groups"""
@@ -380,9 +380,7 @@ class Group(DirectoryObject):
380
380
  @property
381
381
  def permission_grants(self):
382
382
  # type: () -> EntityCollection[ResourceSpecificPermissionGrant]
383
- """
384
- List permissions that have been granted to apps to access the group.
385
- """
383
+ """List permissions that have been granted to apps to access the group."""
386
384
  return self.properties.setdefault(
387
385
  "permissionGrants",
388
386
  EntityCollection(
@@ -394,9 +392,7 @@ class Group(DirectoryObject):
394
392
 
395
393
  @property
396
394
  def photo(self):
397
- """
398
- The group's profile photo
399
- """
395
+ """The group's profile photo"""
400
396
  return self.properties.get(
401
397
  "photo",
402
398
  ProfilePhoto(self.context, ResourcePath("photo", self.resource_path)),
@@ -1,8 +1,17 @@
1
1
  from office365.entity import Entity
2
+ from office365.runtime.paths.resource_path import ResourcePath
2
3
 
3
4
 
4
5
  class ConditionalAccessRoot(Entity):
5
6
  """The conditionalAccessRoot resource is the entry point for the Conditional Access (CA) object model.
6
7
  It doesn't contain any usable properties."""
7
8
 
8
- pass
9
+ @property
10
+ def authentication_strength(self):
11
+ """The entry point for the Conditional Access (CA) object model."""
12
+ return self.properties.get(
13
+ "authenticationStrength",
14
+ ConditionalAccessRoot(
15
+ self.context, ResourcePath("authenticationStrength", self.resource_path)
16
+ ),
17
+ )
@@ -18,9 +18,7 @@ class IdentityContainer(Entity):
18
18
 
19
19
  @property
20
20
  def api_connectors(self):
21
- """
22
- Represents entry point for API connectors.
23
- """
21
+ """Represents entry point for API connectors."""
24
22
  return self.properties.get(
25
23
  "apiConnectors",
26
24
  EntityCollection(
@@ -52,9 +50,7 @@ class IdentityContainer(Entity):
52
50
 
53
51
  @property
54
52
  def b2x_user_flows(self):
55
- """
56
- Represents entry point for B2X/self-service sign-up identity userflows.
57
- """
53
+ """Represents entry point for B2X/self-service sign-up identity userflows."""
58
54
  return self.properties.get(
59
55
  "b2xUserFlows",
60
56
  EntityCollection(
@@ -66,9 +62,7 @@ class IdentityContainer(Entity):
66
62
 
67
63
  @property
68
64
  def user_flow_attributes(self):
69
- """
70
- Represents entry point for identity userflow attributes.
71
- """
65
+ """Represents entry point for identity userflow attributes."""
72
66
  return self.properties.get(
73
67
  "userFlowAttributes",
74
68
  EntityCollection(
@@ -1,3 +1,5 @@
1
+ from typing import Optional
2
+
1
3
  from office365.directory.identities.providers.base import IdentityProviderBase
2
4
 
3
5
 
@@ -8,9 +10,8 @@ class BuiltInIdentityProvider(IdentityProviderBase):
8
10
 
9
11
  @property
10
12
  def identity_provider_type(self):
13
+ # type: () -> Optional[str]
11
14
  """
12
15
  The identity provider type. For a B2B scenario, possible values: AADSignup, MicrosoftAccount, EmailOTP.
13
-
14
- :rtype: str
15
16
  """
16
17
  return self.properties.get("identityProviderType", None)
@@ -1,3 +1,5 @@
1
+ from typing import Optional
2
+
1
3
  from office365.directory.identities.providers.base import IdentityProviderBase
2
4
 
3
5
 
@@ -7,9 +9,6 @@ class SamlOrWsFedProvider(IdentityProviderBase):
7
9
 
8
10
  @property
9
11
  def issuer_uri(self):
10
- """
11
- Issuer URI of the federation server.
12
-
13
- :rtype: str
14
- """
12
+ # type: () -> Optional[str]
13
+ """Issuer URI of the federation server."""
15
14
  return self.properties.get("issuerUri", None)
@@ -3,7 +3,7 @@ from office365.entity_collection import EntityCollection
3
3
  from office365.runtime.queries.function import FunctionQuery
4
4
 
5
5
 
6
- class AppConsentRequestCollection(EntityCollection):
6
+ class AppConsentRequestCollection(EntityCollection[AppConsentRequest]):
7
7
  """AppConsentRequest's collection"""
8
8
 
9
9
  def __init__(self, context, resource_path=None):
@@ -2,6 +2,9 @@ from office365.directory.identitygovernance.accessreview.set import AccessReview
2
2
  from office365.directory.identitygovernance.appconsent.approval_route import (
3
3
  AppConsentApprovalRoute,
4
4
  )
5
+ from office365.directory.identitygovernance.privilegedaccess.root import (
6
+ PrivilegedAccessRoot,
7
+ )
5
8
  from office365.directory.identitygovernance.termsofuse.container import (
6
9
  TermsOfUseContainer,
7
10
  )
@@ -35,9 +38,7 @@ class IdentityGovernance(Entity):
35
38
 
36
39
  @property
37
40
  def access_reviews(self):
38
- """
39
- Container for the base resources that expose the access reviews API and features.
40
- """
41
+ """Container for the base resources that expose the access reviews API and features."""
41
42
  return self.properties.get(
42
43
  "accessReviews",
43
44
  AccessReviewSet(
@@ -45,6 +46,16 @@ class IdentityGovernance(Entity):
45
46
  ),
46
47
  )
47
48
 
49
+ @property
50
+ def privileged_access(self):
51
+ """Container for the base resources that expose the access reviews API and features."""
52
+ return self.properties.get(
53
+ "privilegedAccess",
54
+ PrivilegedAccessRoot(
55
+ self.context, ResourcePath("privilegedAccess", self.resource_path)
56
+ ),
57
+ )
58
+
48
59
  @property
49
60
  def terms_of_use(self):
50
61
  """
@@ -0,0 +1,5 @@
1
+ from office365.entity import Entity
2
+
3
+
4
+ class PrivilegedAccessRoot(Entity):
5
+ """Represents the entry point for resources related to Privileged Identity Management (PIM)."""
@@ -1,3 +1,5 @@
1
+ from typing import Optional
2
+
1
3
  from office365.entity import Entity
2
4
 
3
5
 
@@ -6,3 +8,9 @@ class AgreementAcceptance(Entity):
6
8
  Represents the current status of a user's response to a company's customizable terms of use agreement powered by
7
9
  Azure Active Directory (Azure AD).
8
10
  """
11
+
12
+ @property
13
+ def user_principal_name(self):
14
+ # type: () -> Optional[str]
15
+ """UPN of the user when the acceptance was recorded."""
16
+ return self.properties.get("userPrincipalName", None)
@@ -4,7 +4,7 @@ from office365.directory.identitygovernance.userconsent.request import (
4
4
  from office365.entity_collection import EntityCollection
5
5
 
6
6
 
7
- class UserConsentRequestCollection(EntityCollection):
7
+ class UserConsentRequestCollection(EntityCollection[UserConsentRequest]):
8
8
  """AppConsentRequest's collection"""
9
9
 
10
10
  def __init__(self, context, resource_path=None):
@@ -15,7 +15,7 @@ class ResourceReference(ClientValue):
15
15
  self.webUrl = web_url
16
16
 
17
17
  def __str__(self):
18
- return self.type
18
+ return self.type or ""
19
19
 
20
20
  def __repr__(self):
21
21
  return "{0}:{1}".format(self.type, self.webUrl)
@@ -44,3 +44,6 @@ class KeyCredential(ClientValue):
44
44
  self.startDateTime = start_datetime
45
45
  self.type = key_type
46
46
  self.usage = usage
47
+
48
+ def __str__(self):
49
+ return self.displayName or self.entity_type_name
@@ -1,4 +1,5 @@
1
1
  from office365.runtime.client_value import ClientValue
2
+ from office365.runtime.types.collections import StringCollection
2
3
 
3
4
 
4
5
  class LicenseAssignmentState(ClientValue):
@@ -12,8 +13,31 @@ class LicenseAssignmentState(ClientValue):
12
13
  - Error details if the assignment state is Error
13
14
  """
14
15
 
15
- def __init__(self, assigned_by_group=None):
16
+ def __init__(
17
+ self,
18
+ assigned_by_group=None,
19
+ disabled_plans=None,
20
+ error=None,
21
+ lastUpdatedDateTime=None,
22
+ skuId=None,
23
+ state=None,
24
+ ):
16
25
  """
17
- :param str assigned_by_group:
26
+ :param str assigned_by_group: ndicates whether the license is directly assigned or inherited from a group.
27
+ If directly assigned, this field is null; if inherited through a group membership, this field contains
28
+ the ID of the group.
29
+ :param list[str] disabled_plans: The service plans that are disabled in this assignment
30
+ :param str error: License assignment failure error. If the license is assigned successfully, this field is Null.
31
+ The possible values are CountViolation, MutuallyExclusiveViolation, DependencyViolation,
32
+ ProhibitedInUsageLocationViolation, UniquenessViolation, and Other.
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.
35
+ :param str state: Indicate the current state of this assignment. Read-Only.
36
+ The possible values are Active, ActiveWithError, Disabled, and Error.
18
37
  """
19
38
  self.assignedByGroup = assigned_by_group
39
+ self.disabledPlans = StringCollection(disabled_plans)
40
+ self.error = error
41
+ self.lastUpdatedDateTime = lastUpdatedDateTime
42
+ self.skuId = skuId
43
+ self.state = state
@@ -8,11 +8,12 @@ from office365.runtime.client_value_collection import ClientValueCollection
8
8
  class LicenseDetails(Entity):
9
9
  """Contains information about a license assigned to a user."""
10
10
 
11
+ def __repr__(self):
12
+ return self.sku_part_number or self.entity_type_name
13
+
11
14
  @property
12
15
  def service_plans(self):
13
- """
14
- Information about the service plans assigned with the license. Read-only, Not nullable
15
- """
16
+ """Information about the service plans assigned with the license. Read-only, Not nullable"""
16
17
  return self.properties.get(
17
18
  "servicePlans", ClientValueCollection(ServicePlanInfo)
18
19
  )
@@ -1,3 +1,5 @@
1
+ from typing import Optional
2
+
1
3
  from office365.directory.licenses.service_plan_info import ServicePlanInfo
2
4
  from office365.directory.licenses.units_detail import LicenseUnitsDetail
3
5
  from office365.entity import Entity
@@ -9,35 +11,31 @@ class SubscribedSku(Entity):
9
11
 
10
12
  @property
11
13
  def account_id(self):
12
- """
13
- The unique ID of the account this SKU belongs to.
14
- :rtype: str
15
- """
14
+ # type: () -> Optional[str]
15
+ """The unique ID of the account this SKU belongs to."""
16
16
  return self.properties.get("accountId", None)
17
17
 
18
18
  @property
19
19
  def applies_to(self):
20
+ # type: () -> Optional[str]
20
21
  """
21
22
  The target class for this SKU. Only SKUs with target class User are assignable.
22
23
  Possible values are: "User", "Company".
23
- :rtype: str
24
24
  """
25
25
  return self.properties.get("appliesTo", None)
26
26
 
27
27
  @property
28
28
  def sku_id(self):
29
- """
30
- The unique identifier (GUID) for the service SKU.
31
- :rtype: str
32
- """
29
+ # type: () -> Optional[str]
30
+ """The unique identifier (GUID) for the service SKU."""
33
31
  return self.properties.get("skuId", None)
34
32
 
35
33
  @property
36
34
  def sku_part_number(self):
35
+ # type: () -> Optional[str]
37
36
  """
38
37
  The SKU part number; for example: "AAD_PREMIUM" or "RMSBASIC".
39
38
  To get a list of commercial subscriptions that an organization has acquired, see List subscribedSkus.
40
- :rtype: str
41
39
  """
42
40
  return self.properties.get("skuPartNumber", None)
43
41