Office365-REST-Python-Client 2.4.3__py3-none-any.whl → 2.4.4__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 (255) hide show
  1. {Office365_REST_Python_Client-2.4.3.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/METADATA +8 -7
  2. {Office365_REST_Python_Client-2.4.3.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/RECORD +254 -162
  3. office365/base_item.py +26 -4
  4. office365/communications/calls/invitation_participant_info.py +17 -1
  5. office365/communications/calls/options.py +9 -0
  6. office365/communications/onlinemeetings/provider_type.py +3 -0
  7. office365/communications/presences/presence.py +14 -0
  8. office365/communications/presences/status_message.py +12 -0
  9. office365/directory/audit/signins/activity.py +31 -0
  10. office365/directory/audit/signins/location.py +17 -0
  11. office365/directory/audit/signins/signin.py +25 -0
  12. office365/directory/authentication/authentication.py +9 -0
  13. office365/directory/authentication/methods/details.py +18 -0
  14. office365/directory/authentication/methods/email.py +16 -0
  15. office365/directory/authentication/methods/root.py +10 -0
  16. office365/directory/certificates/authority.py +6 -1
  17. office365/directory/extensions/extended_property.py +8 -1
  18. office365/directory/extensions/extension_property.py +0 -3
  19. office365/directory/extensions/open_type.py +8 -0
  20. office365/directory/groups/group.py +2 -1
  21. office365/directory/identities/governance.py +2 -0
  22. office365/directory/insights/shared.py +15 -1
  23. office365/directory/insights/usage_details.py +16 -0
  24. office365/directory/insights/used.py +7 -0
  25. office365/directory/licenses/assigned_plan.py +14 -2
  26. office365/directory/licenses/service_plan_info.py +4 -0
  27. office365/directory/licenses/subscribed_sku.py +26 -0
  28. office365/directory/licenses/units_detail.py +11 -0
  29. office365/directory/permissions/email_identity.py +5 -0
  30. office365/directory/permissions/grants/condition_set.py +26 -0
  31. office365/directory/permissions/grants/resource_specific.py +21 -0
  32. office365/directory/policies/authentication_flows.py +9 -0
  33. office365/directory/policies/authentication_strength.py +10 -0
  34. office365/directory/policies/authorization.py +8 -0
  35. office365/directory/policies/cross_tenant_access.py +5 -0
  36. office365/directory/policies/root.py +35 -2
  37. office365/directory/rolemanagement/template.py +8 -0
  38. office365/directory/rolemanagement/unified_role_assignment.py +37 -0
  39. office365/directory/security/alerts/alert.py +21 -0
  40. office365/directory/security/alerts/history_state.py +5 -0
  41. office365/directory/security/attacksimulations/automation.py +21 -0
  42. office365/directory/security/attacksimulations/automation_run.py +5 -0
  43. office365/directory/security/attacksimulations/repeat_offender.py +6 -0
  44. office365/directory/security/attacksimulations/root.py +26 -0
  45. office365/directory/security/attacksimulations/simulation.py +17 -0
  46. office365/directory/security/cases/ediscovery.py +6 -0
  47. office365/directory/security/cases/root.py +22 -0
  48. office365/directory/security/incidents/incident.py +67 -0
  49. office365/directory/security/security.py +10 -1
  50. office365/directory/serviceprincipals/service_principal.py +88 -3
  51. office365/directory/synchronization/job.py +16 -0
  52. office365/directory/synchronization/progress.py +5 -0
  53. office365/directory/synchronization/status.py +13 -0
  54. office365/directory/synchronization/synchronization.py +24 -0
  55. office365/directory/tenant_information.py +12 -0
  56. office365/directory/users/password_profile.py +15 -3
  57. office365/directory/users/user.py +136 -8
  58. office365/graph_client.py +28 -1
  59. office365/intune/audit/actor.py +5 -0
  60. office365/intune/audit/event.py +21 -25
  61. office365/intune/audit/event_collection.py +26 -0
  62. office365/intune/audit/property.py +5 -0
  63. office365/intune/audit/resource.py +11 -0
  64. office365/intune/brand.py +6 -0
  65. office365/intune/devices/compliance/__init__.py +0 -0
  66. office365/intune/devices/compliance/policy.py +6 -0
  67. office365/intune/devices/compliance/policy_state.py +5 -0
  68. office365/intune/devices/enrollment/__init__.py +0 -0
  69. office365/intune/devices/enrollment/configuration.py +25 -0
  70. office365/intune/devices/enrollment/configuration_assignment.py +5 -0
  71. office365/intune/devices/enrollment/limit_configuration.py +5 -0
  72. office365/intune/devices/managed.py +28 -3
  73. office365/intune/devices/management/__init__.py +0 -0
  74. office365/intune/devices/management/management.py +69 -0
  75. office365/intune/devices/management/reports/__init__.py +0 -0
  76. office365/intune/devices/management/reports/reports.py +5 -0
  77. office365/intune/devices/management/settings.py +18 -0
  78. office365/intune/organizations/branding.py +15 -0
  79. office365/intune/organizations/organization.py +14 -0
  80. office365/intune/printing/base.py +11 -0
  81. office365/intune/printing/capabilities.py +5 -0
  82. office365/intune/printing/connectors/__init__.py +0 -0
  83. office365/intune/printing/connectors/connector.py +6 -0
  84. office365/intune/printing/operations/__init__.py +0 -0
  85. office365/intune/printing/print.py +24 -0
  86. office365/intune/printing/printer.py +6 -0
  87. office365/intune/printing/services/__init__.py +0 -0
  88. office365/intune/printing/services/endpoint.py +5 -0
  89. office365/intune/printing/services/service.py +17 -0
  90. office365/intune/printing/share.py +5 -0
  91. office365/intune/printing/shares/__init__.py +0 -0
  92. office365/intune/printing/taskdefinitions/__init__.py +0 -0
  93. office365/intune/provisioned_plan.py +5 -1
  94. office365/intune/servicecommunications/issues/issue.py +15 -0
  95. office365/intune/vpp_token.py +10 -0
  96. office365/onedrive/columns/content_approval_status.py +5 -0
  97. office365/onedrive/columns/datetime.py +15 -0
  98. office365/onedrive/columns/definition.py +49 -3
  99. office365/onedrive/columns/definition_collection.py +17 -6
  100. office365/onedrive/columns/types.py +13 -0
  101. office365/onedrive/driveitems/audio.py +12 -1
  102. office365/onedrive/driveitems/driveItem.py +66 -15
  103. office365/onedrive/driveitems/image.py +8 -1
  104. office365/onedrive/driveitems/remote_item.py +19 -4
  105. office365/onedrive/drives/recipient.py +4 -0
  106. office365/onedrive/files/system_info.py +8 -6
  107. office365/onedrive/lists/collection.py +11 -5
  108. office365/onedrive/lists/list.py +13 -5
  109. office365/onedrive/operations/pending.py +13 -0
  110. office365/onedrive/operations/pending_content_update.py +5 -0
  111. office365/onedrive/permissions/collection.py +1 -1
  112. office365/onedrive/sensitivitylabels/__init__.py +0 -0
  113. office365/onedrive/sensitivitylabels/assignment.py +17 -0
  114. office365/onedrive/sensitivitylabels/assignment_method.py +4 -0
  115. office365/onedrive/sensitivitylabels/extract_result.py +13 -0
  116. office365/onedrive/sharepoint_settings.py +25 -0
  117. office365/outlook/calendar/calendar.py +116 -5
  118. office365/outlook/calendar/dateTimeTimeZone.py +3 -0
  119. office365/outlook/calendar/email_address.py +7 -0
  120. office365/outlook/calendar/events/event.py +0 -4
  121. office365/outlook/calendar/events/reminder.py +22 -3
  122. office365/outlook/calendar/group.py +0 -2
  123. office365/outlook/calendar/location_constraint.py +16 -1
  124. office365/outlook/calendar/permissions/__init__.py +0 -0
  125. office365/outlook/calendar/permissions/collection.py +24 -0
  126. office365/outlook/calendar/{permission.py → permissions/permission.py} +35 -2
  127. office365/outlook/calendar/role_type.py +17 -0
  128. office365/outlook/calendar/sharing_message.py +2 -2
  129. office365/outlook/calendar/time_zone_base.py +3 -0
  130. office365/outlook/calendar/working_hours.py +17 -1
  131. office365/outlook/contacts/collection.py +39 -0
  132. office365/outlook/contacts/contact.py +21 -11
  133. office365/outlook/geo_coordinates.py +20 -0
  134. office365/outlook/item.py +5 -2
  135. office365/outlook/locale_info.py +3 -0
  136. office365/outlook/mail/folders/folder.py +51 -2
  137. office365/outlook/mail/folders/search.py +11 -0
  138. office365/outlook/mail/importance.py +1 -0
  139. office365/outlook/mail/item_body.py +3 -0
  140. office365/outlook/mail/location.py +27 -2
  141. office365/outlook/mail/location_constraint_item.py +5 -0
  142. office365/outlook/mail/messages/collection.py +7 -0
  143. office365/outlook/mail/messages/followup_flag.py +21 -0
  144. office365/outlook/mail/messages/internet_header.py +16 -0
  145. office365/outlook/mail/messages/message.py +183 -4
  146. office365/outlook/mail/messages/rules/actions.py +33 -0
  147. office365/outlook/mail/patterned_recurrence.py +14 -1
  148. office365/outlook/mail/physical_address.py +5 -1
  149. office365/outlook/mail/recipient.py +3 -0
  150. office365/outlook/mail/recurrence_pattern.py +18 -1
  151. office365/outlook/mail/recurrence_range.py +16 -2
  152. office365/reports/root.py +19 -1
  153. office365/reports/security/__init__.py +0 -0
  154. office365/reports/security/root.py +21 -0
  155. office365/reports/userregistration/__init__.py +0 -0
  156. office365/reports/userregistration/method_count.py +17 -0
  157. office365/reports/userregistration/method_summary.py +21 -0
  158. office365/sharepoint/activities/logger.py +25 -0
  159. office365/sharepoint/addtoonedrive/mount_point.py +25 -0
  160. office365/sharepoint/addtoonedrive/mounted_folder_info.py +5 -0
  161. office365/sharepoint/alerts/alert.py +31 -0
  162. office365/sharepoint/changes/item.py +14 -0
  163. office365/sharepoint/client_context.py +6 -0
  164. office365/sharepoint/clientsidecomponent/component_context_info.py +7 -0
  165. office365/sharepoint/clientsidecomponent/identifier.py +3 -0
  166. office365/sharepoint/compliance/tag_info.py +17 -0
  167. office365/sharepoint/contenttypes/content_type.py +42 -0
  168. office365/sharepoint/contenttypes/fieldlinks/collection.py +5 -6
  169. office365/sharepoint/features/known_list.py +2 -0
  170. office365/sharepoint/fields/collection.py +60 -41
  171. office365/sharepoint/fields/creation_information.py +5 -4
  172. office365/sharepoint/fields/field.py +73 -15
  173. office365/sharepoint/fields/user.py +3 -3
  174. office365/sharepoint/files/file.py +9 -4
  175. office365/sharepoint/folders/coloring.py +39 -0
  176. office365/sharepoint/folders/coloring_information.py +15 -0
  177. office365/sharepoint/folders/folder.py +21 -10
  178. office365/sharepoint/forms/customization.py +8 -0
  179. office365/sharepoint/listitems/listitem.py +10 -3
  180. office365/sharepoint/lists/bloom_filter.py +0 -1
  181. office365/sharepoint/lists/creation_information.py +18 -4
  182. office365/sharepoint/lists/list.py +199 -24
  183. office365/sharepoint/lists/render_data_parameters.py +21 -1
  184. office365/sharepoint/navigation/configured_metadata_items.py +25 -1
  185. office365/sharepoint/navigation/metadata_settings.py +6 -4
  186. office365/sharepoint/permissions/irm/file_settings.py +43 -0
  187. office365/sharepoint/portal/userprofiles/documents_shared_with_group.py +3 -0
  188. office365/sharepoint/publishing/base_custom_property.py +8 -0
  189. office365/sharepoint/publishing/navigation/structural_navigation_cache_wrapper.py +8 -0
  190. office365/sharepoint/publishing/pagecopywithassets/__init__.py +0 -0
  191. office365/sharepoint/publishing/pagecopywithassets/response.py +8 -0
  192. office365/sharepoint/publishing/pages/campaign_publication.py +7 -0
  193. office365/sharepoint/publishing/pages/page.py +4 -1
  194. office365/sharepoint/publishing/pages/reposts/metadata.py +8 -0
  195. office365/sharepoint/publishing/personmagazine/person_magazine.py +4 -1
  196. office365/sharepoint/search/administration/tenant_crawl_versions_info_provider.py +8 -1
  197. office365/sharepoint/search/query/auto_completion_match.py +3 -0
  198. office365/sharepoint/search/query/property_value.py +18 -0
  199. office365/sharepoint/search/request.py +16 -2
  200. office365/sharepoint/sharing/abilities.py +22 -0
  201. office365/sharepoint/sharing/direct_abilities.py +27 -0
  202. office365/sharepoint/sharing/link_abilities.py +9 -1
  203. office365/sharepoint/sharing/links/data.py +26 -1
  204. office365/sharepoint/sharing/links/info.py +1 -1
  205. office365/sharepoint/sharing/links/partial_success_response.py +5 -0
  206. office365/sharepoint/sharing/links/share_settings.py +24 -1
  207. office365/sharepoint/sharing/object_sharing_information.py +65 -2
  208. office365/sharepoint/sharing/object_sharing_information_user.py +9 -0
  209. office365/sharepoint/sharing/object_sharing_settings.py +17 -4
  210. office365/sharepoint/sharing/principal.py +10 -0
  211. office365/sharepoint/sharing/securable_object_extensions.py +1 -17
  212. office365/sharepoint/sharing/site_sharing_report_helper.py +2 -1
  213. office365/sharepoint/sharing/user_sharing_result.py +18 -8
  214. office365/sharepoint/sitehealth/result.py +10 -0
  215. office365/sharepoint/sites/language.py +11 -1
  216. office365/sharepoint/sites/language_collection.py +1 -0
  217. office365/sharepoint/sites/site.py +34 -6
  218. office365/sharepoint/tenant/administration/audit/search_request_status.py +8 -0
  219. office365/sharepoint/tenant/administration/hubsites/permission.py +10 -0
  220. office365/sharepoint/tenant/administration/tenant.py +1 -0
  221. office365/sharepoint/tenant/apps/information.py +3 -1
  222. office365/sharepoint/tenant/management/office365_tenant.py +0 -1
  223. office365/sharepoint/types/resource_path.py +3 -1
  224. office365/sharepoint/userprofiles/people_manager.py +0 -2
  225. office365/sharepoint/userprofiles/sharedwithme/document.py +16 -0
  226. office365/sharepoint/userprofiles/sharedwithme/document_user.py +12 -0
  227. office365/sharepoint/userprofiles/sharedwithme/item_collection.py +41 -0
  228. office365/sharepoint/userprofiles/sharedwithme/items.py +18 -1
  229. office365/sharepoint/webs/web.py +2 -3
  230. office365/subscriptions/collection.py +12 -6
  231. office365/subscriptions/subscription.py +119 -1
  232. office365/teams/channels/iIdentity.py +5 -0
  233. office365/teams/chats/collection.py +1 -2
  234. office365/teams/chats/messages/info.py +9 -0
  235. office365/teams/chats/messages/message.py +17 -2
  236. office365/teams/members/aad_user_conversation.py +2 -2
  237. office365/teams/members/conversation_collection.py +3 -3
  238. office365/teams/schedule/change_tracked_entity.py +11 -2
  239. office365/teams/tabs/configuration.py +12 -1
  240. office365/teams/tabs/tab.py +0 -1
  241. office365/teams/team.py +23 -1
  242. office365/teams/teamwork/__init__.py +0 -0
  243. office365/teams/teamwork/activity_topic.py +5 -0
  244. office365/teams/teamwork/tags/__init__.py +0 -0
  245. office365/teams/teamwork/tags/member.py +5 -0
  246. office365/{directory/security/cases_root.py → teams/viva/employee_experience_user.py} +1 -1
  247. office365/intune/devices/management.py +0 -35
  248. {Office365_REST_Python_Client-2.4.3.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/LICENSE +0 -0
  249. {Office365_REST_Python_Client-2.4.3.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/WHEEL +0 -0
  250. {Office365_REST_Python_Client-2.4.3.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/top_level.txt +0 -0
  251. /office365/{teams/messages → directory/security/cases}/__init__.py +0 -0
  252. /office365/{teams/tags → directory/synchronization}/__init__.py +0 -0
  253. /office365/teams/{tags → teamwork/tags}/identity.py +0 -0
  254. /office365/teams/{tags → teamwork/tags}/tag.py +0 -0
  255. /office365/teams/{user_teamwork.py → teamwork/user.py} +0 -0
office365/base_item.py CHANGED
@@ -1,6 +1,8 @@
1
+ from datetime import datetime
1
2
  from office365.directory.permissions.identity_set import IdentitySet
2
3
  from office365.entity import Entity
3
4
  from office365.onedrive.listitems.item_reference import ItemReference
5
+ from office365.runtime.paths.resource_path import ResourcePath
4
6
 
5
7
 
6
8
  class BaseItem(Entity):
@@ -17,20 +19,38 @@ class BaseItem(Entity):
17
19
  """Identity of the user, device, or application which created the item."""
18
20
  return self.properties.get('createdBy', IdentitySet())
19
21
 
22
+ @property
23
+ def created_by_user(self):
24
+ """
25
+ Identity of the user who created the item
26
+ """
27
+ from office365.directory.users.user import User
28
+ return self.properties.get('createdByUser',
29
+ User(self.context, ResourcePath("createdByUser", self.resource_path)))
30
+
20
31
  @property
21
32
  def last_modified_by(self):
22
33
  """Identity of the user, device, and application which last modified the item."""
23
34
  return self.properties.get('lastModifiedBy', IdentitySet())
24
35
 
36
+ @property
37
+ def last_modified_by_user(self):
38
+ """
39
+ Identity of the user who last modified the item.
40
+ """
41
+ from office365.directory.users.user import User
42
+ return self.properties.get('lastModifiedByUser',
43
+ User(self.context, ResourcePath("lastModifiedByUser", self.resource_path)))
44
+
25
45
  @property
26
46
  def created_datetime(self):
27
47
  """Gets date and time of item creation."""
28
- return self.properties.get('createdDateTime', None)
48
+ return self.properties.get('createdDateTime', datetime.min)
29
49
 
30
50
  @property
31
51
  def last_modified_datetime(self):
32
52
  """Gets date and time the item was last modified."""
33
- return self.properties.get('lastModifiedDateTime', None)
53
+ return self.properties.get('lastModifiedDateTime', datetime.min)
34
54
 
35
55
  @property
36
56
  def name(self):
@@ -50,7 +70,6 @@ class BaseItem(Entity):
50
70
  def description(self):
51
71
  """
52
72
  Provides a user-visible description of the item.
53
-
54
73
  :rtype: str or None
55
74
  """
56
75
  return self.properties.get('description', None)
@@ -63,7 +82,6 @@ class BaseItem(Entity):
63
82
  def web_url(self):
64
83
  """
65
84
  URL that displays the resource in the browser.
66
-
67
85
  :rtype: str or None
68
86
  """
69
87
  return self.properties.get('webUrl', None)
@@ -81,7 +99,11 @@ class BaseItem(Entity):
81
99
  if default_value is None:
82
100
  property_mapping = {
83
101
  "createdBy": self.created_by,
102
+ "createdByUser": self.created_by_user,
103
+ "createdDateTime": self.created_datetime,
104
+ "lastModifiedDateTime": self.last_modified_datetime,
84
105
  "lastModifiedBy": self.last_modified_by,
106
+ "lastModifiedByUser": self.last_modified_by_user,
85
107
  "parentReference": self.parent_reference
86
108
  }
87
109
  default_value = property_mapping.get(name, None)
@@ -1,6 +1,22 @@
1
+ from office365.directory.permissions.identity_set import IdentitySet
1
2
  from office365.runtime.client_value import ClientValue
2
3
 
3
4
 
4
5
  class InvitationParticipantInfo(ClientValue):
5
6
  """This resource is used to represent the entity that is being invited to a group call."""
6
- pass
7
+
8
+ def __init__(self, hidden=None, identity=IdentitySet(), participant_id=None,
9
+ remove_from_default_audio_routing_group=None, replaces_call_id=None):
10
+ """
11
+ :param bool hidden: Optional. Whether to hide the participant from the roster.
12
+ :param IdentitySet identity: The identitySet associated with this invitation.
13
+ :param str participant_id: Optional. The ID of the target participant.
14
+ :param bool remove_from_default_audio_routing_group: Optional. Whether to remove them from the main mixer.
15
+ :param str replaces_call_id: Optional. The call which the target identity is currently a part of.
16
+ For peer-to-peer case, the call will be dropped once the participant is added successfully.
17
+ """
18
+ self.hidden = hidden
19
+ self.identity = identity
20
+ self.participantId = participant_id
21
+ self.removeFromDefaultAudioRoutingGroup = remove_from_default_audio_routing_group
22
+ self.replacesCallId = replaces_call_id
@@ -3,3 +3,12 @@ from office365.runtime.client_value import ClientValue
3
3
 
4
4
  class CallOptions(ClientValue):
5
5
  """Represents an abstract base class that contains the optional features for a call."""
6
+
7
+ def __init__(self, hide_bot_after_escalation=None, is_content_sharing_notification_enabled=None):
8
+ """
9
+ :param bool hide_bot_after_escalation: Indicates whether to hide the app after the call is escalated.
10
+ :param bool is_content_sharing_notification_enabled: Indicates whether content sharing notifications should be
11
+ enabled for the call.
12
+ """
13
+ self.hideBotAfterEscalation = hide_bot_after_escalation
14
+ self.isContentSharingNotificationEnabled = is_content_sharing_notification_enabled
@@ -5,6 +5,9 @@ class OnlineMeetingProviderType:
5
5
  pass
6
6
 
7
7
  unknown = 0
8
+
8
9
  skypeForBusiness = 1
10
+
9
11
  skypeForConsumer = 2
12
+
10
13
  teamsForBusiness = 3
@@ -1,4 +1,6 @@
1
+ from office365.communications.presences.status_message import PresenceStatusMessage
1
2
  from office365.entity import Entity
3
+ from office365.outlook.mail.item_body import ItemBody
2
4
  from office365.runtime.queries.service_operation import ServiceOperationQuery
3
5
 
4
6
 
@@ -46,6 +48,18 @@ class Presence(Entity):
46
48
  self.context.add_query(qry)
47
49
  return self
48
50
 
51
+ def set_status_message(self, message):
52
+ """
53
+ Set a presence status message for a user. An optional expiration date and time can be supplied.
54
+ :param str message: Status message item.
55
+ """
56
+ payload = {
57
+ "statusMessage": PresenceStatusMessage(ItemBody(message))
58
+ }
59
+ qry = ServiceOperationQuery(self, "setStatusMessage", None, payload)
60
+ self.context.add_query(qry)
61
+ return self
62
+
49
63
  def set_user_preferred_presence(self, availability="Available", activity="Available", expiration_duration=None):
50
64
  """
51
65
  Set the preferred availability and activity status for a user. If the preferred presence of a user is set,
@@ -0,0 +1,12 @@
1
+ from office365.outlook.mail.item_body import ItemBody
2
+ from office365.runtime.client_value import ClientValue
3
+
4
+
5
+ class PresenceStatusMessage(ClientValue):
6
+ """Represents a presence status message related to the presence of a user in Microsoft Teams."""
7
+
8
+ def __init__(self, message=ItemBody()):
9
+ """
10
+ :param ItemBody message: Status message item.
11
+ """
12
+ self.message = message
@@ -0,0 +1,31 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class SignInActivity(ClientValue):
5
+ """Provides the last interactive or non-interactive sign-in time for a specific user. Since signInActivity
6
+ describes a property of the user object, Azure AD stores sign in activity for your users for as long as the
7
+ user object exists."""
8
+
9
+ def __init__(self, last_non_interactive_sign_in_datetime=None, last_non_interactive_sign_in_request_id=None,
10
+ last_sign_in_datetime=None, last_sign_in_request_id=None):
11
+ """
12
+ :param datetime.datetime last_non_interactive_sign_in_datetime: The last non-interactive sign-in date for a
13
+ specific user. You can use this field to calculate the last time a client attempted to sign into the
14
+ directory on behalf of a user. Because some users may use clients to access tenant resources rather
15
+ than signing into your tenant directly, you can use the non-interactive sign-in date to along with
16
+ lastSignInDateTime to identify inactive users.
17
+ :param str last_non_interactive_sign_in_request_id: Request identifier of the last non-interactive sign-in
18
+ performed by this user.
19
+ :param datetime.datetime last_sign_in_datetime: The last interactive sign-in date and time for a specific user.
20
+ You can use this field to calculate the last time a user attempted to sign into the directory with an
21
+ interactive authentication method. This field can be used to build reports, such as inactive users.
22
+ The timestamp represents date and time information using ISO 8601 format and is always in UTC time.
23
+ For example, midnight UTC on Jan 1, 2014 is: '2014-01-01T00:00:00Z'. Azure AD maintains interactive
24
+ sign-ins going back to April 2020. For more information about using the value of this property,
25
+ see Manage inactive user accounts in Azure AD.
26
+ :param str last_sign_in_request_id: Request identifier of the last interactive sign-in performed by this user.
27
+ """
28
+ self.lastNonInteractiveSignInDateTime = last_non_interactive_sign_in_datetime
29
+ self.lastNonInteractiveSignInRequestId = last_non_interactive_sign_in_request_id
30
+ self.lastSignInDateTime = last_sign_in_datetime
31
+ self.lastSignInRequestId = last_sign_in_request_id
@@ -1,5 +1,22 @@
1
+ from office365.onedrive.driveitems.geo_coordinates import GeoCoordinates
1
2
  from office365.runtime.client_value import ClientValue
2
3
 
3
4
 
4
5
  class SignInLocation(ClientValue):
5
6
  """Provides the city, state and country/region from where the sign-in happened."""
7
+
8
+ def __init__(self, city=None, country_or_region=None, geo_coordinates=GeoCoordinates(), state=None):
9
+ """
10
+ :param str city: Provides the city where the sign-in originated. This is calculated using latitude/longitude
11
+ information from the sign-in activity.
12
+ :param str country_or_region: Provides the country code info (2 letter code) where the sign-in originated.
13
+ This is calculated using latitude/longitude information from the sign-in activity.
14
+ :param GeoCoordinates geo_coordinates: Provides the latitude, longitude and altitude where the sign-in
15
+ originated.
16
+ :param str state: Provides the State where the sign-in originated. This is calculated using latitude/longitude
17
+ information from the sign-in activity.
18
+ """
19
+ self.city = city
20
+ self.countryOrRegion = country_or_region
21
+ self.geoCoordinates = geo_coordinates
22
+ self.state = state
@@ -9,6 +9,31 @@ class SignIn(Entity):
9
9
  You must have an Azure AD Premium P1 or P2 license to download sign-in logs using the Microsoft Graph API.
10
10
  """
11
11
 
12
+ @property
13
+ def app_display_name(self):
14
+ """
15
+ App name displayed in the Azure Portal.
16
+ :rtype: str
17
+ """
18
+ return self.properties.get("appDisplayName", None)
19
+
20
+ @property
21
+ def app_id(self):
22
+ """
23
+ Unique GUID representing the app ID in the Azure Active Directory.
24
+ :rtype: str
25
+ """
26
+ return self.properties.get("appId", None)
27
+
28
+ @property
29
+ def client_app_used(self):
30
+ """
31
+ Identifies the client used for the sign-in activity. Modern authentication clients include Browser, modern
32
+ clients. Legacy authentication clients include Exchange ActiveSync, IMAP, MAPI, SMTP, POP, and other clients.
33
+ :rtype: str
34
+ """
35
+ return self.properties.get("clientAppUsed", None)
36
+
12
37
  @property
13
38
  def device_detail(self):
14
39
  """Device information from where the sign-in occurred; includes device ID, operating system, and browser.
@@ -10,6 +10,14 @@ class Authentication(Entity):
10
10
  for users.
11
11
  """
12
12
 
13
+ @property
14
+ def email_methods(self):
15
+ """The email address registered to a user for authentication."""
16
+ from office365.directory.authentication.methods.email import EmailAuthenticationMethod
17
+ return self.properties.get('emailMethods',
18
+ EntityCollection(self.context, EmailAuthenticationMethod,
19
+ ResourcePath("emailMethods", self.resource_path)))
20
+
13
21
  @property
14
22
  def fido2_methods(self):
15
23
  """Represents the FIDO2 security keys registered to a user for authentication."""
@@ -45,6 +53,7 @@ class Authentication(Entity):
45
53
  def get_property(self, name, default_value=None):
46
54
  if default_value is None:
47
55
  property_mapping = {
56
+ "emailMethods": self.email_methods,
48
57
  "fido2Methods": self.fido2_methods,
49
58
  "passwordMethods": self.password_methods,
50
59
  "phoneMethods": self.phone_methods
@@ -5,3 +5,21 @@ class UserRegistrationDetails(Entity):
5
5
  """Represents the state of a user's authentication methods, including which methods are registered and which
6
6
  features the user is registered and capable of (such as multi-factor authentication, self-service password reset,
7
7
  and passwordless authentication)."""
8
+
9
+ @property
10
+ def is_admin(self):
11
+ """
12
+ Indicates whether the user has an admin role in the tenant. This value can be used to check the authentication
13
+ methods that privileged accounts are registered for and capable of.
14
+ :rtype: bool
15
+ """
16
+ return self.properties.get("isAdmin", None)
17
+
18
+ @property
19
+ def is_mfa_registered(self):
20
+ """
21
+ Indicates whether the user has registered a strong authentication method for multi-factor authentication.
22
+ The method may not necessarily be allowed by the authentication methods policy.
23
+ :rtype: bool
24
+ """
25
+ return self.properties.get("isMfaRegistered", None)
@@ -0,0 +1,16 @@
1
+ from office365.directory.authentication.methods.method import AuthenticationMethod
2
+
3
+
4
+ class EmailAuthenticationMethod(AuthenticationMethod):
5
+ """
6
+ Represents an email address registered to a user. Email as an authentication method is available only for
7
+ self-service password reset (SSPR). Users may only have one email authentication method.
8
+ """
9
+
10
+ @property
11
+ def email_address(self):
12
+ """
13
+ The email address registered to this user.
14
+ :rtype: str
15
+ """
16
+ return self.properties.get("emailAddress", None)
@@ -1,12 +1,22 @@
1
1
  from office365.directory.authentication.methods.details import UserRegistrationDetails
2
2
  from office365.entity import Entity
3
3
  from office365.entity_collection import EntityCollection
4
+ from office365.reports.userregistration.method_summary import UserRegistrationMethodSummary
5
+ from office365.runtime.client_result import ClientResult
4
6
  from office365.runtime.paths.resource_path import ResourcePath
7
+ from office365.runtime.queries.function import FunctionQuery
5
8
 
6
9
 
7
10
  class AuthenticationMethodsRoot(Entity):
8
11
  """Container for navigation properties for Azure AD authentication methods resources."""
9
12
 
13
+ def users_registered_by_method(self):
14
+ """Get the number of users registered for each authentication method."""
15
+ return_type = ClientResult(self.context, UserRegistrationMethodSummary())
16
+ qry = FunctionQuery(self, "usersRegisteredByMethod", None, return_type)
17
+ self.context.add_query(qry)
18
+ return return_type
19
+
10
20
  @property
11
21
  def user_registration_details(self):
12
22
  """Represents the state of a user's authentication methods, including which methods are registered and which
@@ -4,14 +4,19 @@ from office365.runtime.client_value import ClientValue
4
4
  class CertificateAuthority(ClientValue):
5
5
  """Represents a certificate authority."""
6
6
 
7
- def __init__(self, certificate=None, certificate_revocation_list_url=None, is_root_authority=None):
7
+ def __init__(self, certificate=None, certificate_revocation_list_url=None, is_root_authority=None,
8
+ issuer=None, issuer_ski=None):
8
9
  """
9
10
  :param str certificate: The base64 encoded string representing the public certificate.
10
11
  :param str certificate_revocation_list_url: The URL of the certificate revocation list.
11
12
  :param str is_root_authority: Required. true if the trusted certificate is a root authority, false if the
12
13
  trusted certificate is an intermediate authority.
14
+ :param str issuer: The issuer of the certificate, calculated from the certificate value
15
+ :param str issuer_ski: The subject key identifier of the certificate, calculated from the certificate value.
13
16
  """
14
17
  super(CertificateAuthority, self).__init__()
15
18
  self.certificate = certificate
16
19
  self.certificateRevocationListUrl = certificate_revocation_list_url
17
20
  self.isRootAuthority = is_root_authority
21
+ self.issuer = issuer
22
+ self.issuerSki = issuer_ski
@@ -4,7 +4,14 @@ from office365.runtime.types.collections import StringCollection
4
4
 
5
5
  class SingleValueLegacyExtendedProperty(Entity):
6
6
  """An extended property that contains a single value."""
7
- pass
7
+
8
+ @property
9
+ def value(self):
10
+ """
11
+ A property value.
12
+ :rtype: str
13
+ """
14
+ return self.properties.get("value", None)
8
15
 
9
16
 
10
17
  class MultiValueLegacyExtendedProperty(Entity):
@@ -15,7 +15,6 @@ class ExtensionProperty(DirectoryObject):
15
15
  def name(self):
16
16
  """
17
17
  Name of the extension property.
18
-
19
18
  :rtype: str
20
19
  """
21
20
  return self.properties.get("name", None)
@@ -24,7 +23,6 @@ class ExtensionProperty(DirectoryObject):
24
23
  def app_display_name(self):
25
24
  """
26
25
  Display name of the application object on which this extension property is defined. Read-only.
27
-
28
26
  :rtype: str
29
27
  """
30
28
  return self.properties.get("appDisplayName", None)
@@ -39,7 +37,6 @@ class ExtensionProperty(DirectoryObject):
39
37
  Integer - 32-bit value.
40
38
  LargeInteger - 64-bit value.
41
39
  String - 256 characters maximum
42
-
43
40
  :rtype: str
44
41
  """
45
42
  return self.properties.get("dataType", None)
@@ -7,3 +7,11 @@ class OpenTypeExtension(Extension):
7
7
  an extensibility option that provides an easy way to directly add untyped properties to a resource
8
8
  in Microsoft Graph.
9
9
  """
10
+
11
+ @property
12
+ def extension_name(self):
13
+ """
14
+ A unique text identifier for an open type data extension. Optional.
15
+ :rtype: str
16
+ """
17
+ return self.properties.get("extensionName", None)
@@ -40,8 +40,9 @@ class Group(DirectoryObject):
40
40
  return self
41
41
 
42
42
  def check_granted_permissions_for_app(self):
43
+ """"""
43
44
  return_type = EntityCollection(self.context, ResourceSpecificPermissionGrant)
44
- qry = ServiceOperationQuery(self, "checkGrantedPermissionsForApp", None, None, None, return_type)
45
+ qry = ServiceOperationQuery(self, "checkGrantedPermissionsForApp", return_type=return_type)
45
46
  self.context.add_query(qry)
46
47
  return return_type
47
48
 
@@ -11,3 +11,5 @@ class IdentityGovernance(Entity):
11
11
  - App consent
12
12
  - Terms of use
13
13
  """
14
+
15
+
@@ -1,5 +1,7 @@
1
1
  from office365.directory.insights.resource_reference import ResourceReference
2
+ from office365.directory.insights.sharing_detail import SharingDetail
2
3
  from office365.entity import Entity
4
+ from office365.runtime.client_value_collection import ClientValueCollection
3
5
  from office365.runtime.paths.resource_path import ResourcePath
4
6
 
5
7
 
@@ -12,6 +14,11 @@ class SharedInsight(Entity):
12
14
  that users share as a links in an email.
13
15
  """
14
16
 
17
+ @property
18
+ def last_shared(self):
19
+ """Details about the shared item. Read-only"""
20
+ return self.properties.get("lastShared", SharingDetail())
21
+
15
22
  @property
16
23
  def resource_reference(self):
17
24
  """Reference properties of the used document, such as the url and type of the document. Read-only"""
@@ -24,10 +31,17 @@ class SharedInsight(Entity):
24
31
  return self.properties.get('resource',
25
32
  Entity(self.context, ResourcePath("resource", self.resource_path)))
26
33
 
34
+ @property
35
+ def sharing_history(self):
36
+ """Details about the sharing history. Read-only"""
37
+ return self.properties.get("sharingHistory", ClientValueCollection(SharingDetail))
38
+
27
39
  def get_property(self, name, default_value=None):
28
40
  if default_value is None:
29
41
  property_mapping = {
30
- "resourceReference": self.resource_reference
42
+ "lastShared": self.last_shared,
43
+ "resourceReference": self.resource_reference,
44
+ "sharingHistory": self.sharing_history
31
45
  }
32
46
  default_value = property_mapping.get(name, None)
33
47
  return super(SharedInsight, self).get_property(name, default_value)
@@ -0,0 +1,16 @@
1
+ from datetime import datetime
2
+
3
+ from office365.runtime.client_value import ClientValue
4
+
5
+
6
+ class UsageDetails(ClientValue):
7
+ """Complex type containing properties of Used items. Information on when the resource was last accessed (viewed)
8
+ or modified (edited) by the user."""
9
+
10
+ def __init__(self, last_accessed_datetime=None, last_modified_datetime=None):
11
+ """
12
+ :param datetime.datetime last_accessed_datetime: The date and time the resource was last accessed by the user.
13
+ :param datetime.datetime last_modified_datetime: The date and time the resource was last modified by the user.
14
+ """
15
+ self.lastAccessedDateTime = last_accessed_datetime
16
+ self.lastModifiedDateTime = last_modified_datetime
@@ -1,4 +1,5 @@
1
1
  from office365.directory.insights.resource_reference import ResourceReference
2
+ from office365.directory.insights.usage_details import UsageDetails
2
3
  from office365.entity import Entity
3
4
  from office365.runtime.paths.resource_path import ResourcePath
4
5
 
@@ -11,6 +12,11 @@ class UsedInsight(Entity):
11
12
  SharePoint
12
13
  """
13
14
 
15
+ @property
16
+ def last_used(self):
17
+ """Information about when the item was last viewed or modified by the user."""
18
+ return self.properties.get("lastUsed", UsageDetails())
19
+
14
20
  @property
15
21
  def resource_reference(self):
16
22
  """Reference properties of the used document, such as the url and type of the document. Read-only"""
@@ -26,6 +32,7 @@ class UsedInsight(Entity):
26
32
  def get_property(self, name, default_value=None):
27
33
  if default_value is None:
28
34
  property_mapping = {
35
+ "lastUsed": self.last_used,
29
36
  "resourceReference": self.resource_reference
30
37
  }
31
38
  default_value = property_mapping.get(name, None)
@@ -6,9 +6,21 @@ class AssignedPlan(ClientValue):
6
6
  The assignedPlans property of both the user entity and the organization entity is a collection of assignedPlan.
7
7
  """
8
8
 
9
- def __init__(self, assigned_datetime=None):
9
+ def __init__(self, assigned_datetime=None, capability_status=None, service=None, service_plan_id=None):
10
10
  """
11
- :param datetime assigned_datetime: The date and time at which the plan was assigned.
11
+ :param datetime.datetime assigned_datetime: The date and time at which the plan was assigned.
12
+ :param str capability_status: Condition of the capability assignment.
13
+ The possible values are Enabled, Warning, Suspended, Deleted, LockedOut.
14
+ See a detailed description of each value.
15
+ :param str service: The name of the service; for example, exchange.
16
+ :param str service_plan_id: A GUID that identifies the service plan. For a complete list of GUIDs and their
17
+ equivalent friendly service names, see Product names and service plan identifiers for licensing.
12
18
  """
13
19
  self.assignedDateTime = assigned_datetime
20
+ self.capabilityStatus = capability_status
21
+ self.service = service
22
+ self.servicePlanId = service_plan_id
23
+
24
+ def __repr__(self):
25
+ return self.service
14
26
 
@@ -27,3 +27,7 @@ class ServicePlanInfo(ClientValue):
27
27
  self.servicePlanName = name
28
28
  self.provisioningStatus = provisioning_status
29
29
  self.appliesTo = applies_to
30
+
31
+ def __repr__(self):
32
+ return self.servicePlanName
33
+
@@ -1,4 +1,5 @@
1
1
  from office365.directory.licenses.service_plan_info import ServicePlanInfo
2
+ from office365.directory.licenses.units_detail import LicenseUnitsDetail
2
3
  from office365.entity import Entity
3
4
  from office365.runtime.client_value_collection import ClientValueCollection
4
5
 
@@ -9,10 +10,20 @@ class SubscribedSku(Entity):
9
10
  @property
10
11
  def account_id(self):
11
12
  """
13
+ The unique ID of the account this SKU belongs to.
12
14
  :rtype: str
13
15
  """
14
16
  return self.properties.get("accountId", None)
15
17
 
18
+ @property
19
+ def applies_to(self):
20
+ """
21
+ The target class for this SKU. Only SKUs with target class User are assignable.
22
+ Possible values are: "User", "Company".
23
+ :rtype: str
24
+ """
25
+ return self.properties.get("appliesTo", None)
26
+
16
27
  @property
17
28
  def sku_id(self):
18
29
  """
@@ -21,6 +32,20 @@ class SubscribedSku(Entity):
21
32
  """
22
33
  return self.properties.get("skuId", None)
23
34
 
35
+ @property
36
+ def sku_part_number(self):
37
+ """
38
+ The SKU part number; for example: "AAD_PREMIUM" or "RMSBASIC".
39
+ To get a list of commercial subscriptions that an organization has acquired, see List subscribedSkus.
40
+ :rtype: str
41
+ """
42
+ return self.properties.get("skuPartNumber", None)
43
+
44
+ @property
45
+ def prepaid_units(self):
46
+ """Information about the number and status of prepaid licenses."""
47
+ return self.properties.get("prepaidUnits", LicenseUnitsDetail())
48
+
24
49
  @property
25
50
  def service_plans(self):
26
51
  """Information about the service plans that are available with the SKU. Not nullable"""
@@ -29,6 +54,7 @@ class SubscribedSku(Entity):
29
54
  def get_property(self, name, default_value=None):
30
55
  if default_value is None:
31
56
  property_mapping = {
57
+ "prepaidUnits": self.prepaid_units,
32
58
  "servicePlans": self.service_plans
33
59
  }
34
60
  default_value = property_mapping.get(name, None)
@@ -0,0 +1,11 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class LicenseUnitsDetail(ClientValue):
5
+ """"""
6
+
7
+ def __init__(self, enabled=None):
8
+ """
9
+ :param int enabled: The number of units that are enabled for the active subscription of the service SKU.
10
+ """
11
+ self.enabled = enabled
@@ -0,0 +1,5 @@
1
+ from office365.directory.permissions.identity import Identity
2
+
3
+
4
+ class EmailIdentity(Identity):
5
+ """Represents the email identity of a user."""