Office365-REST-Python-Client 2.5.13__py3-none-any.whl → 2.5.14__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 (137) hide show
  1. {Office365_REST_Python_Client-2.5.13.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/METADATA +1 -1
  2. {Office365_REST_Python_Client-2.5.13.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/RECORD +135 -78
  3. office365/booking/business/business.py +13 -0
  4. office365/booking/business/collection.py +8 -4
  5. office365/communications/callrecords/collection.py +42 -0
  6. office365/communications/callrecords/direct_routing_log_row.py +5 -0
  7. office365/communications/cloud_communications.py +2 -3
  8. office365/directory/applications/application.py +16 -2
  9. office365/directory/applications/required_resource_access.py +23 -0
  10. office365/directory/applications/resource_access.py +26 -0
  11. office365/directory/authentication/methods/details.py +29 -0
  12. office365/directory/authentication/methods/root.py +8 -0
  13. office365/directory/permissions/scope.py +15 -3
  14. office365/directory/policies/authentication_strength.py +21 -0
  15. office365/directory/policies/update_allowed_combinations_result.py +5 -0
  16. office365/directory/security/alerts/evidence.py +2 -1
  17. office365/directory/security/alerts/malware_evidence.py +5 -0
  18. office365/directory/security/alerts/process_evidence.py +5 -0
  19. office365/directory/security/attacksimulations/user.py +5 -0
  20. office365/directory/security/attacksimulations/user_coverage.py +3 -0
  21. office365/directory/security/attacksimulations/users/details.py +6 -1
  22. office365/directory/serviceprincipals/service_principal.py +86 -37
  23. office365/onedrive/driveitems/driveItem.py +1 -1
  24. office365/onedrive/driveitems/retention_label.py +33 -0
  25. office365/onedrive/driveitems/retention_label_settings.py +7 -0
  26. office365/onedrive/sitepages/base.py +3 -0
  27. office365/onedrive/sitepages/collection.py +12 -0
  28. office365/onedrive/sitepages/site_page.py +9 -9
  29. office365/onedrive/sites/archival_details.py +5 -0
  30. office365/onedrive/sites/site_collection.py +10 -1
  31. office365/onedrive/workbooks/functions/functions.py +23 -0
  32. office365/partners/billing/__init__.py +0 -0
  33. office365/planner/tasks/check_list_item.py +5 -1
  34. office365/runtime/client_object.py +15 -7
  35. office365/runtime/client_object_collection.py +2 -2
  36. office365/runtime/client_result.py +2 -0
  37. office365/runtime/client_value.py +1 -1
  38. office365/runtime/csom/request.py +11 -0
  39. office365/runtime/types/exceptions.py +18 -0
  40. office365/search/acronym.py +10 -0
  41. office365/search/aggregation_option.py +6 -0
  42. office365/search/answer.py +9 -0
  43. office365/search/entity.py +67 -14
  44. office365/search/entity_type.py +28 -0
  45. office365/search/request.py +32 -3
  46. office365/sharepoint/apps/access_requests.py +5 -0
  47. office365/sharepoint/apps/management/__init__.py +0 -0
  48. office365/sharepoint/apps/management/principal_info.py +9 -0
  49. office365/sharepoint/authpolicy/events/collection.py +28 -0
  50. office365/sharepoint/authpolicy/events/role_assignment_resource_payload.py +4 -0
  51. office365/sharepoint/documentmanagement/document_id.py +28 -3
  52. office365/sharepoint/files/file.py +11 -4
  53. office365/sharepoint/files/versions/event.py +9 -0
  54. office365/sharepoint/flows/permissions.py +30 -0
  55. office365/sharepoint/listhome/favorite_item.py +9 -0
  56. office365/sharepoint/listitems/listitem.py +79 -4
  57. office365/sharepoint/listitems/update_parameters.py +4 -1
  58. office365/sharepoint/lists/data_parameters.py +5 -0
  59. office365/sharepoint/lists/exporter.py +73 -0
  60. office365/sharepoint/lists/list.py +148 -61
  61. office365/sharepoint/lists/render_data_parameters.py +31 -0
  62. office365/sharepoint/lists/version_policy_manager.py +5 -0
  63. office365/sharepoint/migration/copy_migration_options.py +5 -0
  64. office365/sharepoint/portal/groups/site_manager.py +32 -0
  65. office365/sharepoint/portal/project/__init__.py +9 -0
  66. office365/sharepoint/portal/userprofiles/documentsshared/__init__.py +0 -0
  67. office365/sharepoint/portal/userprofiles/documentsshared/with_group.py +38 -0
  68. office365/sharepoint/portal/userprofiles/documentsshared/with_person.py +9 -0
  69. office365/sharepoint/portal/userprofiles/sharedwithme/__init__.py +0 -0
  70. office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/document.py +1 -1
  71. office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/items.py +3 -1
  72. office365/sharepoint/publishing/pages/coauth_state.py +8 -0
  73. office365/sharepoint/publishing/pages/page.py +11 -0
  74. office365/sharepoint/publishing/pages/stream_content.py +9 -0
  75. office365/sharepoint/publishing/pages/stream_data.py +8 -0
  76. office365/sharepoint/quotamanagement/consumer/non_quota_backfill_api.py +8 -0
  77. office365/sharepoint/request.py +3 -0
  78. office365/sharepoint/search/administration/site_content_processing_info_provider.py +11 -0
  79. office365/sharepoint/search/ranking_labeling.py +1 -0
  80. office365/sharepoint/search/reports/abandonedqueries/__init__.py +0 -0
  81. office365/sharepoint/search/reports/abandonedqueries/data.py +0 -0
  82. office365/sharepoint/search/reports/abandonedqueries/item.py +5 -0
  83. office365/sharepoint/search/reports/noresult/__init__.py +0 -0
  84. office365/sharepoint/search/reports/numberofqueries/__init__.py +0 -0
  85. office365/sharepoint/search/reports/top_queries.py +7 -0
  86. office365/sharepoint/search/reports/topqueries/__init__.py +0 -0
  87. office365/sharepoint/search/reports/topqueries/data.py +9 -0
  88. office365/sharepoint/search/reports/topqueries/item.py +15 -0
  89. office365/sharepoint/search/scs_endpoint.py +9 -0
  90. office365/sharepoint/securestore/target_application.py +8 -0
  91. office365/sharepoint/sharing/document_manager.py +3 -3
  92. office365/sharepoint/sharing/result.py +21 -0
  93. office365/sharepoint/sites/html_field_security_setting.py +5 -0
  94. office365/sharepoint/sites/site.py +30 -1
  95. office365/sharepoint/sites/version_policy_manager.py +25 -0
  96. office365/sharepoint/sitescripts/metadata.py +28 -3
  97. office365/sharepoint/sitescripts/utility.py +17 -0
  98. office365/sharepoint/smartcache/__init__.py +0 -0
  99. office365/sharepoint/smartcache/item.py +9 -0
  100. office365/sharepoint/tenant/administration/app_billing_properties.py +21 -0
  101. office365/sharepoint/tenant/administration/insights/summary_response.py +8 -0
  102. office365/sharepoint/tenant/administration/internal/aad/__init__.py +0 -0
  103. office365/sharepoint/tenant/administration/internal/aad/permission_grant.py +32 -0
  104. office365/sharepoint/tenant/administration/internal/appservice/__init__.py +0 -0
  105. office365/sharepoint/tenant/administration/internal/appservice/permission_grant.py +5 -0
  106. office365/sharepoint/tenant/administration/internal/{permission_grant.py → appservice/permission_request.py} +4 -2
  107. office365/sharepoint/tenant/administration/internal/appservice/principal.py +104 -0
  108. office365/sharepoint/tenant/administration/settings_service.py +4 -1
  109. office365/sharepoint/tenant/administration/sites/creation_source.py +8 -8
  110. office365/sharepoint/tenant/administration/tenant.py +110 -4
  111. office365/sharepoint/tenant/administration/types.py +13 -1
  112. office365/sharepoint/tenant/cdn_api.py +3 -1
  113. office365/sharepoint/tenant/management/office365_tenant.py +2 -0
  114. office365/sharepoint/tenant/settings.py +10 -0
  115. office365/sharepoint/utilities/utility.py +6 -0
  116. office365/sharepoint/viva/connections_page.py +8 -0
  117. office365/sharepoint/viva/dashboard_configuration.py +8 -0
  118. office365/sharepoint/viva/employee_engagement.py +39 -1
  119. office365/sharepoint/viva/resource_get_endpoint.py +8 -0
  120. office365/sharepoint/viva/resource_link.py +8 -0
  121. office365/sharepoint/webs/information.py +66 -1
  122. office365/sharepoint/webs/regional_settings.py +32 -0
  123. office365/sharepoint/webs/templates/__init__.py +0 -0
  124. office365/sharepoint/webs/time_zone.py +1 -1
  125. office365/sharepoint/webs/web.py +58 -0
  126. office365/sharepoint/workflow/task.py +5 -0
  127. office365/subscriptions/collection.py +16 -0
  128. office365/sharepoint/portal/userprofiles/documents_shared_with_group.py +0 -11
  129. office365/sharepoint/tenant/administration/internal/web_appservice_principal.py +0 -23
  130. {Office365_REST_Python_Client-2.5.13.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/LICENSE +0 -0
  131. {Office365_REST_Python_Client-2.5.13.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/WHEEL +0 -0
  132. {Office365_REST_Python_Client-2.5.13.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/top_level.txt +0 -0
  133. /office365/{sharepoint/userprofiles/sharedwithme → partners}/__init__.py +0 -0
  134. /office365/sharepoint/portal/userprofiles/{documents_shared_with_me.py → documentsshared/with_me.py} +0 -0
  135. /office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/document_user.py +0 -0
  136. /office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/item_collection.py +0 -0
  137. /office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/view_item_removal_result.py +0 -0
@@ -0,0 +1,5 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class ReportAbandonedQueriesItem(ClientValue):
5
+ pass
@@ -1,7 +1,14 @@
1
+ from office365.runtime.client_value_collection import ClientValueCollection
1
2
  from office365.sharepoint.search.reports.base import ReportBase
3
+ from office365.sharepoint.search.reports.topqueries.item import ReportTopQueriesItem
2
4
 
3
5
 
4
6
  class ReportTopQueries(ReportBase):
7
+
8
+ def __init__(self, reports=None):
9
+ super(ReportTopQueries, self).__init__()
10
+ self.Reports = ClientValueCollection(ReportTopQueriesItem, reports)
11
+
5
12
  @property
6
13
  def entity_type_name(self):
7
14
  return "Microsoft.Office.Server.Search.REST.ReportTopQueries"
@@ -0,0 +1,9 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class ReportTopQueriesData(ClientValue):
5
+ """ """
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return "Microsoft.Office.Server.Search.REST.ReportTopQueriesData"
@@ -0,0 +1,15 @@
1
+ from office365.runtime.client_value import ClientValue
2
+ from office365.runtime.client_value_collection import ClientValueCollection
3
+ from office365.sharepoint.search.reports.topqueries.data import ReportTopQueriesData
4
+
5
+
6
+ class ReportTopQueriesItem(ClientValue):
7
+ """ """
8
+
9
+ def __init__(self, date=None, report=None):
10
+ self.Date = date
11
+ self.Report = ClientValueCollection(ReportTopQueriesData, report)
12
+
13
+ @property
14
+ def entity_type_name(self):
15
+ return "Microsoft.Office.Server.Search.REST.ReportTopQueriesItem"
@@ -0,0 +1,9 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class ScsEndpoint(ClientValue):
5
+ """ """
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return "Microsoft.Office.Server.Search.REST.ScsEndpoint"
@@ -1,3 +1,5 @@
1
+ from typing import Optional
2
+
1
3
  from office365.runtime.queries.service_operation import ServiceOperationQuery
2
4
  from office365.sharepoint.client_context import ClientContext
3
5
  from office365.sharepoint.entity import Entity
@@ -27,6 +29,12 @@ class TargetApplication(Entity):
27
29
  context.add_query(qry)
28
30
  return return_type
29
31
 
32
+ @property
33
+ def application_id(self):
34
+ # type: () -> Optional[str]
35
+ """"""
36
+ return self.properties.get("ApplicationId", None)
37
+
30
38
  @property
31
39
  def entity_type_name(self):
32
40
  return "Microsoft.Office.SecureStoreService.Server.TargetApplication"
@@ -3,11 +3,11 @@ from office365.runtime.client_value_collection import ClientValueCollection
3
3
  from office365.runtime.queries.service_operation import ServiceOperationQuery
4
4
  from office365.sharepoint.entity import Entity
5
5
  from office365.sharepoint.permissions.roles.definitions.definition import RoleDefinition
6
- from office365.sharepoint.sharing.user_role_assignment import UserRoleAssignment
7
- from office365.sharepoint.sharing.user_sharing_result import UserSharingResult
8
- from office365.sharepoint.userprofiles.sharedwithme.view_item_removal_result import (
6
+ from office365.sharepoint.portal.userprofiles.sharedwithme.view_item_removal_result import (
9
7
  SharedWithMeViewItemRemovalResult,
10
8
  )
9
+ from office365.sharepoint.sharing.user_role_assignment import UserRoleAssignment
10
+ from office365.sharepoint.sharing.user_sharing_result import UserSharingResult
11
11
 
12
12
 
13
13
  class DocumentSharingManager(Entity):
@@ -4,6 +4,8 @@ from office365.runtime.client_value_collection import ClientValueCollection
4
4
  from office365.runtime.paths.resource_path import ResourcePath
5
5
  from office365.sharepoint.entity import Entity
6
6
  from office365.sharepoint.principal.groups.collection import GroupCollection
7
+ from office365.sharepoint.principal.groups.group import Group
8
+ from office365.sharepoint.principal.users.collection import UserCollection
7
9
  from office365.sharepoint.sharing.invitation.creation_result import (
8
10
  SPInvitationCreationResult,
9
11
  )
@@ -78,6 +80,23 @@ class SharingResult(Entity):
78
80
  ),
79
81
  )
80
82
 
83
+ @property
84
+ def group_users_added_to(self):
85
+ return self.properties.get(
86
+ "GroupUsersAddedTo",
87
+ Group(self.context, ResourcePath("GroupUsersAddedTo", self.resource_path)),
88
+ )
89
+
90
+ @property
91
+ def users_with_access_requests(self):
92
+ return self.properties.get(
93
+ "UsersWithAccessRequests",
94
+ UserCollection(
95
+ self.context,
96
+ ResourcePath("UsersWithAccessRequests", self.resource_path),
97
+ ),
98
+ )
99
+
81
100
  @property
82
101
  def users_added_to_group(self):
83
102
  # type: () -> ClientValueCollection[UserSharingResult]
@@ -90,8 +109,10 @@ class SharingResult(Entity):
90
109
  if default_value is None:
91
110
  property_mapping = {
92
111
  "GroupsSharedWith": self.groups_shared_with,
112
+ "GroupUsersAddedTo": self.group_users_added_to,
93
113
  "UsersAddedToGroup": self.users_added_to_group,
94
114
  "UniquelyPermissionedUsers": self.uniquely_permissioned_users,
115
+ "UsersWithAccessRequests": self.users_with_access_requests,
95
116
  }
96
117
  default_value = property_mapping.get(name, None)
97
118
  return super(SharingResult, self).get_property(name, default_value)
@@ -0,0 +1,5 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class HTMLFieldSecuritySetting(ClientValue):
5
+ """ """
@@ -27,6 +27,9 @@ from office365.sharepoint.sitehealth.summary import SiteHealthSummary
27
27
  from office365.sharepoint.sites.azure_container_Info import (
28
28
  ProvisionedTemporaryAzureContainerInfo,
29
29
  )
30
+ from office365.sharepoint.sites.html_field_security_setting import (
31
+ HTMLFieldSecuritySetting,
32
+ )
30
33
  from office365.sharepoint.sites.sph_site import SPHSite
31
34
  from office365.sharepoint.sites.upgrade_info import UpgradeInfo
32
35
  from office365.sharepoint.sites.usage_info import UsageInfo
@@ -504,7 +507,7 @@ class Site(Entity):
504
507
  @property
505
508
  def allowed_external_domains(self):
506
509
  # type: () -> Optional[bool]
507
- return self.properties.get("AllowedExternalDomains", None)
510
+ return self.properties.get("AllowedExternalDomains", HTMLFieldSecuritySetting())
508
511
 
509
512
  @property
510
513
  def allow_master_page_editing(self):
@@ -574,6 +577,32 @@ class Site(Entity):
574
577
  """Gets the current change token that is used in the change log for the site collection."""
575
578
  return self.properties.get("CurrentChangeToken", ChangeToken())
576
579
 
580
+ @property
581
+ def disable_flows(self):
582
+ # type: () -> Optional[bool]
583
+ """"""
584
+ return self.properties.get("DisableFlows", None)
585
+
586
+ @property
587
+ def external_sharing_tips_enabled(self):
588
+ # type: () -> Optional[bool]
589
+ """Gets a Boolean value that specifies whether users will be greeted with a notification bar telling them that
590
+ the site can be shared with external users. The value is true if the notification bar is enabled; otherwise,
591
+ it is false."""
592
+ return self.properties.get("ExternalSharingTipsEnabled", None)
593
+
594
+ @property
595
+ def external_user_expiration_in_days(self):
596
+ # type: () -> Optional[int]
597
+ """"""
598
+ return self.properties.get("ExternalUserExpirationInDays", None)
599
+
600
+ @property
601
+ def geo_location(self):
602
+ # type: () -> Optional[str]
603
+ """"""
604
+ return self.properties.get("GeoLocation", None)
605
+
577
606
  @property
578
607
  def group_id(self):
579
608
  # type: () -> Optional[str]
@@ -1,7 +1,9 @@
1
1
  from typing import Optional
2
2
 
3
+ from office365.runtime.paths.resource_path import ResourcePath
3
4
  from office365.runtime.queries.service_operation import ServiceOperationQuery
4
5
  from office365.sharepoint.entity import Entity
6
+ from office365.sharepoint.lists.version_policy_manager import VersionPolicyManager
5
7
 
6
8
 
7
9
  class SiteVersionPolicyManager(Entity):
@@ -13,8 +15,31 @@ class SiteVersionPolicyManager(Entity):
13
15
  """ """
14
16
  return self.properties.get("MajorVersionLimit", None)
15
17
 
18
+ @property
19
+ def version_policies(self):
20
+ return self.properties.get(
21
+ "VersionPolicies",
22
+ VersionPolicyManager(
23
+ self.context, ResourcePath("VersionPolicies", self.resource_path)
24
+ ),
25
+ )
26
+
27
+ def inherit_tenant_settings(self):
28
+ """ """
29
+ qry = ServiceOperationQuery(self, "InheritTenantSettings")
30
+ self.context.add_query(qry)
31
+ return self
32
+
16
33
  def set_auto_expiration(self):
17
34
  """"""
18
35
  qry = ServiceOperationQuery(self, "SetAutoExpiration")
19
36
  self.context.add_query(qry)
20
37
  return self
38
+
39
+ def get_property(self, name, default_value=None):
40
+ if default_value is None:
41
+ property_mapping = {
42
+ "VersionPolicies": self.version_policies,
43
+ }
44
+ default_value = property_mapping.get(name, None)
45
+ return super(SiteVersionPolicyManager, self).get_property(name, default_value)
@@ -2,11 +2,36 @@ from office365.runtime.client_value import ClientValue
2
2
 
3
3
 
4
4
  class SiteScriptMetadata(ClientValue):
5
- def __init__(self, _id=None, content=None, description=None):
5
+ """Represents metadata about a SharePoint site script in the SharePoint framework.
6
+ Site scripts are used to automate the provisioning of SharePoint sites by defining actions like
7
+ applying a theme, adding lists, and configuring site settings."""
8
+
9
+ def __init__(
10
+ self,
11
+ id_=None,
12
+ content=None,
13
+ description=None,
14
+ is_site_script_package=None,
15
+ title=None,
16
+ version=None,
17
+ ):
6
18
  """
7
- :param str content:
19
+ :param str id_: unique identifier (GUID) for the site script. This is used to uniquely identify the script
20
+ within SharePoint.
21
+ :param str content: The actual JSON content of the site script. This contains the actions that the script
22
+ will execute when applied to a SharePoint site.
8
23
  :param str description:
24
+ :param bool is_site_script_package:
25
+ :param str title:
26
+ :param int version:
9
27
  """
10
- self.Id = _id
28
+ self.Id = id_
11
29
  self.Content = content
12
30
  self.Description = description
31
+ self.IsSiteScriptPackage = is_site_script_package
32
+ self.Title = title
33
+ self.Version = version
34
+
35
+ @property
36
+ def entity_type_name(self):
37
+ return "Microsoft.SharePoint.Utilities.WebTemplateExtensions.SiteScriptMetadata"
@@ -42,6 +42,23 @@ class SiteScriptUtility(Entity):
42
42
  context.add_query(qry)
43
43
  return return_type
44
44
 
45
+ @staticmethod
46
+ def get_list_designs(context, store=None):
47
+ """
48
+ Gets a list designs.
49
+
50
+ :param office365.sharepoint.client_context.ClientContext context: SharePoint context
51
+ :param str store:
52
+ """
53
+ return_type = ClientResult(context, SiteDesignMetadata())
54
+ utility = SiteScriptUtility(context)
55
+ payload = {"store": store}
56
+ qry = ServiceOperationQuery(
57
+ utility, "GetListDesigns", None, payload, None, return_type, True
58
+ )
59
+ context.add_query(qry)
60
+ return return_type
61
+
45
62
  @staticmethod
46
63
  def add_site_design_task(context, web_url, site_design_id):
47
64
  """
File without changes
@@ -0,0 +1,9 @@
1
+ from office365.sharepoint.entity import Entity
2
+
3
+
4
+ class SmartCacheItem(Entity):
5
+ """ """
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return "Microsoft.SharePoint.SmartCache.SmartCacheItem"
@@ -0,0 +1,21 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class SPOAppBillingProperties(ClientValue):
5
+ """ """
6
+
7
+ def __init__(self, application_id=None, azure_region=None, is_activated=None):
8
+ """
9
+ :param str application_id: The application ID.
10
+ :param str azure_region: The Azure region.
11
+ :param bool is_activated:
12
+ """
13
+ self.ApplicationId = application_id
14
+ self.AzureRegion = azure_region
15
+ self.IsActivated = is_activated
16
+
17
+ @property
18
+ def entity_type_name(self):
19
+ return (
20
+ "Microsoft.Online.SharePoint.TenantAdministration.SPOAppBillingProperties"
21
+ )
@@ -0,0 +1,8 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class InsightsSummaryResponse(ClientValue):
5
+
6
+ @property
7
+ def entity_type_name(self):
8
+ return "Microsoft.SharePoint.Administration.TenantAdmin.InsightsSummaryResponse"
@@ -0,0 +1,32 @@
1
+ from typing_extensions import Self
2
+
3
+ from office365.runtime.queries.service_operation import ServiceOperationQuery
4
+ from office365.sharepoint.entity import Entity
5
+ from office365.sharepoint.entity_collection import EntityCollection
6
+
7
+
8
+ class SPO3rdPartyAADPermissionGrant(Entity):
9
+ @property
10
+ def entity_type_name(self):
11
+ return "Microsoft.Online.SharePoint.TenantAdministration.Internal.SPO3rdPartyAADPermissionGrant"
12
+
13
+
14
+ class SPO3rdPartyAADPermissionGrantCollection(
15
+ EntityCollection[SPO3rdPartyAADPermissionGrant]
16
+ ):
17
+
18
+ def __init__(self, context, resource_path=None):
19
+ super(SPO3rdPartyAADPermissionGrantCollection, self).__init__(
20
+ context, SPO3rdPartyAADPermissionGrant, resource_path
21
+ )
22
+
23
+ def add(self, service_principal_id, resource, scope):
24
+ # type: (str, str, str) -> Self
25
+ payload = {
26
+ "servicePrincipalId": service_principal_id,
27
+ "resource": resource,
28
+ "scope": scope,
29
+ }
30
+ qry = ServiceOperationQuery(self, "Add", None, payload)
31
+ self.context.add_query(qry)
32
+ return self
@@ -0,0 +1,5 @@
1
+ from office365.sharepoint.entity import Entity
2
+
3
+
4
+ class SPOWebAppServicePrincipalPermissionGrant(Entity):
5
+ """"""
@@ -1,7 +1,9 @@
1
1
  from office365.sharepoint.entity import Entity
2
2
 
3
3
 
4
- class SPO3rdPartyAADPermissionGrant(Entity):
4
+ class SPOWebAppServicePrincipalPermissionRequest(Entity):
5
+ """ """
6
+
5
7
  @property
6
8
  def entity_type_name(self):
7
- return "Microsoft.Online.SharePoint.TenantAdministration.Internal.SPO3rdPartyAADPermissionGrant"
9
+ return "Microsoft.Online.SharePoint.TenantAdministration.Internal.SPOWebAppServicePrincipalPermissionRequest"
@@ -0,0 +1,104 @@
1
+ from typing import Optional
2
+
3
+ from office365.runtime.paths.resource_path import ResourcePath
4
+ from office365.runtime.queries.service_operation import ServiceOperationQuery
5
+ from office365.runtime.types.collections import StringCollection
6
+ from office365.sharepoint.entity import Entity
7
+ from office365.sharepoint.entity_collection import EntityCollection
8
+ from office365.sharepoint.tenant.administration.internal.aad.permission_grant import (
9
+ SPO3rdPartyAADPermissionGrantCollection,
10
+ )
11
+ from office365.sharepoint.tenant.administration.internal.appservice.permission_grant import (
12
+ SPOWebAppServicePrincipalPermissionGrant,
13
+ )
14
+ from office365.sharepoint.tenant.administration.internal.appservice.permission_request import (
15
+ SPOWebAppServicePrincipalPermissionRequest,
16
+ )
17
+
18
+
19
+ class SPOWebAppServicePrincipal(Entity):
20
+ def __init__(self, context):
21
+ stat_path = ResourcePath(
22
+ "Microsoft.Online.SharePoint.TenantAdministration.Internal.SPOWebAppServicePrincipal"
23
+ )
24
+ super(SPOWebAppServicePrincipal, self).__init__(context, stat_path)
25
+
26
+ def update_spfx_client_secret(self, secret_value):
27
+ """
28
+ :param str secret_value:
29
+ """
30
+ payload = {"secretValue": secret_value}
31
+ qry = ServiceOperationQuery(self, "UpdateSpfxClientSecret", None, payload)
32
+ self.context.add_query(qry)
33
+ return self
34
+
35
+ def update_spfx_third_party_app_id(self, app_id):
36
+ payload = {"appId": app_id}
37
+ qry = ServiceOperationQuery(self, "UpdateSpfxThirdPartyAppId", None, payload)
38
+ self.context.add_query(qry)
39
+ return self
40
+
41
+ @property
42
+ def account_enabled(self):
43
+ # type: () -> Optional[bool]
44
+ """ """
45
+ return self.properties.get("AccountEnabled", False)
46
+
47
+ @property
48
+ def app_id(self):
49
+ # type: () -> Optional[str]
50
+ """ """
51
+ return self.properties.get("AppId", False)
52
+
53
+ @property
54
+ def reply_urls(self):
55
+ # type: () -> StringCollection
56
+ """ """
57
+ return self.properties.get("ReplyUrls", StringCollection())
58
+
59
+ @property
60
+ def grant_manager(self):
61
+ return self.properties.get(
62
+ "GrantManager",
63
+ SPO3rdPartyAADPermissionGrantCollection(
64
+ self.context,
65
+ ResourcePath("GrantManager", self.resource_path),
66
+ ),
67
+ )
68
+
69
+ @property
70
+ def permission_grants(self):
71
+ return self.properties.get(
72
+ "PermissionGrants",
73
+ EntityCollection(
74
+ self.context,
75
+ SPOWebAppServicePrincipalPermissionGrant,
76
+ ResourcePath("PermissionGrants", self.resource_path),
77
+ ),
78
+ )
79
+
80
+ @property
81
+ def permission_requests(self):
82
+ return self.properties.get(
83
+ "PermissionRequests",
84
+ EntityCollection(
85
+ self.context,
86
+ SPOWebAppServicePrincipalPermissionRequest,
87
+ ResourcePath("PermissionRequests", self.resource_path),
88
+ ),
89
+ )
90
+
91
+ @property
92
+ def entity_type_name(self):
93
+ return "Microsoft.Online.SharePoint.TenantAdministration.Internal.SPOWebAppServicePrincipal"
94
+
95
+ def get_property(self, name, default_value=None):
96
+ if default_value is None:
97
+ property_mapping = {
98
+ "GrantManager": self.grant_manager,
99
+ "PermissionRequests": self.permission_requests,
100
+ "PermissionGrants": self.permission_grants,
101
+ "ReplyUrls": self.reply_urls,
102
+ }
103
+ default_value = property_mapping.get(name, None)
104
+ return super(SPOWebAppServicePrincipal, self).get_property(name, default_value)
@@ -30,7 +30,10 @@ class TenantAdminSettingsService(Entity):
30
30
 
31
31
  @property
32
32
  def auto_quota_enabled(self):
33
- """"""
33
+ """Controls whether automatic quota management is enabled for SharePoint Online site collections.
34
+ When this feature is enabled, SharePoint Online automatically adjusts the storage quota for site collections
35
+ based on their usage, helping to ensure that site collections don't run out of space.
36
+ """
34
37
  return self.properties.get("AutoQuotaEnabled", AutoQuotaEnabled())
35
38
 
36
39
  @property
@@ -11,20 +11,20 @@ from office365.sharepoint.tenant.administration.sites.creation_data import (
11
11
  class SiteCreationSource(ClientValue):
12
12
  def __init__(
13
13
  self,
14
- IsSyncThresholdLimitReached=None,
15
- LastRefreshTimeStamp=None,
14
+ is_sync_threshold_limit_reached=None,
15
+ last_refresh_time_stamp=None,
16
16
  site_creation_data=None,
17
- SyncThresholdLimit=None,
18
- TotalSitesCount=None,
17
+ sync_threshold_limit=None,
18
+ total_sites_count=None,
19
19
  ):
20
20
  # type: (bool, datetime, List[SiteCreationData], int, int) -> None
21
- self.IsSyncThresholdLimitReached = IsSyncThresholdLimitReached
22
- self.LastRefreshTimeStamp = LastRefreshTimeStamp
21
+ self.IsSyncThresholdLimitReached = is_sync_threshold_limit_reached
22
+ self.LastRefreshTimeStamp = last_refresh_time_stamp
23
23
  self.SiteCreationData = ClientValueCollection(
24
24
  SiteCreationData, site_creation_data
25
25
  )
26
- self.SyncThresholdLimit = SyncThresholdLimit
27
- self.TotalSitesCount = TotalSitesCount
26
+ self.SyncThresholdLimit = sync_threshold_limit
27
+ self.TotalSitesCount = total_sites_count
28
28
 
29
29
  @property
30
30
  def entity_type_name(self):