Office365-REST-Python-Client 2.5.12__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.
- {Office365_REST_Python_Client-2.5.12.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/METADATA +1 -1
- {Office365_REST_Python_Client-2.5.12.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/RECORD +199 -107
- office365/backuprestore/root.py +39 -0
- office365/backuprestore/service_status.py +5 -0
- office365/booking/business/business.py +13 -0
- office365/booking/business/collection.py +8 -4
- office365/booking/solutions/root.py +14 -1
- office365/communications/callrecords/collection.py +42 -0
- office365/communications/callrecords/direct_routing_log_row.py +5 -0
- office365/communications/cloud_communications.py +2 -3
- office365/directory/applications/application.py +33 -2
- office365/directory/applications/optional_claim.py +5 -0
- office365/directory/applications/optional_claims.py +16 -0
- office365/directory/applications/required_resource_access.py +23 -0
- office365/directory/applications/resource_access.py +26 -0
- office365/directory/authentication/conditions/event_listener.py +9 -0
- office365/directory/authentication/methods/details.py +29 -0
- office365/directory/authentication/methods/root.py +8 -0
- office365/directory/device_local_credential_info.py +21 -0
- office365/directory/identities/container.py +18 -0
- office365/directory/permissions/scope.py +15 -3
- office365/directory/policies/authentication_flows.py +8 -0
- office365/directory/policies/authentication_strength.py +21 -0
- office365/directory/policies/root.py +17 -0
- office365/directory/policies/unified_role_management.py +7 -0
- office365/directory/policies/update_allowed_combinations_result.py +5 -0
- office365/directory/protection/policy/__init__.py +0 -0
- office365/directory/protection/policy/base.py +24 -0
- office365/directory/protection/policy/one_drive_for_business.py +10 -0
- office365/directory/security/alerts/evidence.py +2 -1
- office365/directory/security/alerts/malware_evidence.py +5 -0
- office365/directory/security/alerts/process_evidence.py +5 -0
- office365/directory/security/attacksimulations/user.py +5 -0
- office365/directory/security/attacksimulations/user_coverage.py +3 -0
- office365/directory/security/attacksimulations/users/details.py +12 -0
- office365/directory/serviceprincipals/service_principal.py +118 -18
- office365/directory/users/user.py +23 -3
- office365/graph_client.py +3 -1
- office365/intune/devices/management/management.py +26 -0
- office365/intune/devices/management/terms_and_conditions.py +10 -0
- office365/intune/devices/management/virtual_endpoint.py +8 -0
- office365/onedrive/driveitems/driveItem.py +1 -1
- office365/onedrive/driveitems/retention_label.py +33 -0
- office365/onedrive/driveitems/retention_label_settings.py +7 -0
- office365/onedrive/sitepages/base.py +3 -0
- office365/onedrive/sitepages/collection.py +12 -0
- office365/onedrive/sitepages/site_page.py +9 -9
- office365/onedrive/sites/archival_details.py +5 -0
- office365/onedrive/sites/site_collection.py +10 -1
- office365/onedrive/workbooks/functions/functions.py +23 -0
- office365/partners/__init__.py +0 -0
- office365/partners/billing/__init__.py +0 -0
- office365/planner/tasks/check_list_item.py +5 -1
- office365/runtime/client_object.py +24 -8
- office365/runtime/client_object_collection.py +4 -4
- office365/runtime/client_result.py +21 -2
- office365/runtime/client_value.py +1 -1
- office365/runtime/csom/request.py +11 -0
- office365/runtime/odata/v4/batch_request.py +12 -15
- office365/runtime/types/exceptions.py +18 -0
- office365/search/acronym.py +10 -0
- office365/search/aggregation_option.py +6 -0
- office365/search/answer.py +9 -0
- office365/search/entity.py +67 -14
- office365/search/entity_type.py +28 -0
- office365/search/request.py +32 -3
- office365/sharepoint/apps/access_requests.py +5 -0
- office365/sharepoint/apps/context_site.py +41 -0
- office365/sharepoint/apps/management/__init__.py +0 -0
- office365/sharepoint/apps/management/principal_info.py +9 -0
- office365/sharepoint/authpolicy/events/collection.py +39 -0
- office365/sharepoint/authpolicy/events/{auth_event.py → event.py} +1 -0
- office365/sharepoint/authpolicy/events/role_assignment_resource_payload.py +9 -0
- office365/sharepoint/brandcenter/__init__.py +0 -0
- office365/sharepoint/brandcenter/brand_center.py +9 -0
- office365/sharepoint/brandcenter/configuration.py +5 -0
- office365/sharepoint/changes/change.py +1 -3
- office365/sharepoint/changes/collection.py +3 -0
- office365/sharepoint/changes/folder.py +6 -0
- office365/sharepoint/changes/group.py +3 -0
- office365/sharepoint/changes/list.py +13 -0
- office365/sharepoint/changes/view.py +25 -0
- office365/sharepoint/client_context.py +19 -1
- office365/sharepoint/contenttypes/fieldlinks/collection.py +3 -0
- office365/sharepoint/copilot/__init__.py +0 -0
- office365/sharepoint/copilot/file_collection.py +27 -0
- office365/sharepoint/copilot/file_collection_query_result.py +10 -0
- office365/sharepoint/copilot/list_item_extensions.py +5 -0
- office365/sharepoint/directory/provider/alternate_id_data.py +5 -0
- office365/sharepoint/directory/provider/notification.py +8 -0
- office365/sharepoint/directory/provider/object_changes.py +5 -0
- office365/sharepoint/directory/provider/object_data.py +26 -3
- office365/sharepoint/directory/provider/provider.py +1 -0
- office365/sharepoint/directory/provider/session_data.py +9 -0
- office365/sharepoint/documentmanagement/document_id.py +28 -3
- office365/sharepoint/files/file.py +11 -4
- office365/sharepoint/files/versions/event.py +9 -0
- office365/sharepoint/flows/permissions.py +30 -0
- office365/sharepoint/listhome/favorite_item.py +9 -0
- office365/sharepoint/listitems/listitem.py +79 -4
- office365/sharepoint/listitems/update_parameters.py +4 -1
- office365/sharepoint/lists/data_parameters.py +5 -0
- office365/sharepoint/lists/exporter.py +73 -0
- office365/sharepoint/lists/list.py +157 -7
- office365/sharepoint/lists/render_data_parameters.py +31 -0
- office365/sharepoint/lists/version_policy_manager.py +5 -0
- office365/sharepoint/logger/log_export.py +2 -0
- office365/sharepoint/migration/copy_migration_options.py +5 -0
- office365/sharepoint/migrationcenter/service/performance/data.py +5 -5
- office365/sharepoint/multigeo/services.py +24 -0
- office365/sharepoint/navigation/menu_node.py +43 -1
- office365/sharepoint/navigation/node_collection.py +1 -1
- office365/sharepoint/oauth/token.py +22 -0
- office365/sharepoint/oauth/token_response.py +5 -0
- office365/sharepoint/portal/groups/site_manager.py +32 -0
- office365/sharepoint/portal/project/__init__.py +9 -0
- office365/sharepoint/portal/userprofiles/documentsshared/__init__.py +0 -0
- office365/sharepoint/portal/userprofiles/documentsshared/with_group.py +38 -0
- office365/sharepoint/portal/userprofiles/documentsshared/with_person.py +9 -0
- office365/sharepoint/portal/userprofiles/sharedwithme/__init__.py +0 -0
- office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/document.py +1 -1
- office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/items.py +3 -1
- office365/sharepoint/publishing/pages/campaign_publication.py +10 -0
- office365/sharepoint/publishing/pages/coauth_state.py +8 -0
- office365/sharepoint/publishing/pages/page.py +11 -0
- office365/sharepoint/publishing/pages/stream_content.py +9 -0
- office365/sharepoint/publishing/pages/stream_data.py +8 -0
- office365/sharepoint/quotamanagement/consumer/non_quota_backfill_api.py +8 -0
- office365/sharepoint/request.py +3 -0
- office365/sharepoint/search/administration/site_content_processing_info_provider.py +11 -0
- office365/sharepoint/search/ranking_labeling.py +1 -0
- office365/sharepoint/search/reports/abandonedqueries/__init__.py +0 -0
- office365/sharepoint/search/reports/abandonedqueries/data.py +0 -0
- office365/sharepoint/search/reports/abandonedqueries/item.py +5 -0
- office365/sharepoint/search/reports/noresult/__init__.py +0 -0
- office365/sharepoint/search/reports/numberofqueries/__init__.py +0 -0
- office365/sharepoint/search/reports/top_queries.py +7 -0
- office365/sharepoint/search/reports/topqueries/__init__.py +0 -0
- office365/sharepoint/search/reports/topqueries/data.py +9 -0
- office365/sharepoint/search/reports/topqueries/item.py +15 -0
- office365/sharepoint/search/scs_endpoint.py +9 -0
- office365/sharepoint/securestore/target_application.py +10 -0
- office365/sharepoint/sharing/document_manager.py +3 -3
- office365/sharepoint/sharing/inherited_from.py +5 -0
- office365/sharepoint/sharing/internal/__init__.py +0 -0
- office365/sharepoint/sharing/internal/sharing_restrictions.py +22 -0
- office365/sharepoint/sharing/internal/types.py +17 -0
- office365/sharepoint/sharing/link_info.py +24 -0
- office365/sharepoint/sharing/result.py +21 -0
- office365/sharepoint/sites/html_field_security_setting.py +5 -0
- office365/sharepoint/sites/site.py +39 -1
- office365/sharepoint/sites/version_policy_manager.py +33 -0
- office365/sharepoint/sitescripts/metadata.py +28 -3
- office365/sharepoint/sitescripts/utility.py +17 -0
- office365/sharepoint/smartcache/__init__.py +0 -0
- office365/sharepoint/smartcache/item.py +9 -0
- office365/sharepoint/tenant/administration/app_billing_properties.py +21 -0
- office365/sharepoint/tenant/administration/insights/summary_response.py +8 -0
- office365/sharepoint/tenant/administration/internal/aad/__init__.py +0 -0
- office365/sharepoint/tenant/administration/internal/aad/permission_grant.py +32 -0
- office365/sharepoint/tenant/administration/internal/appservice/__init__.py +0 -0
- office365/sharepoint/tenant/administration/internal/appservice/permission_grant.py +5 -0
- office365/sharepoint/tenant/administration/internal/{permission_grant.py → appservice/permission_request.py} +4 -2
- office365/sharepoint/tenant/administration/internal/appservice/principal.py +104 -0
- office365/sharepoint/tenant/administration/policies/__init__.py +0 -0
- office365/sharepoint/tenant/administration/policies/definition.py +5 -0
- office365/sharepoint/tenant/administration/settings_service.py +12 -1
- office365/sharepoint/tenant/administration/sites/creation_source.py +8 -8
- office365/sharepoint/tenant/administration/sites/properties.py +45 -0
- office365/sharepoint/tenant/administration/tenant.py +124 -4
- office365/sharepoint/tenant/administration/types.py +29 -1
- office365/sharepoint/tenant/cdn_api.py +3 -1
- office365/sharepoint/tenant/management/office365_tenant.py +2 -0
- office365/sharepoint/tenant/settings.py +10 -0
- office365/sharepoint/utilities/utility.py +6 -0
- office365/sharepoint/utilities/wopi_host.py +45 -0
- office365/sharepoint/viva/connections_page.py +8 -0
- office365/sharepoint/viva/dashboard_configuration.py +8 -0
- office365/sharepoint/viva/employee_engagement.py +39 -1
- office365/sharepoint/viva/resource_get_endpoint.py +8 -0
- office365/sharepoint/viva/resource_link.py +8 -0
- office365/sharepoint/webs/information.py +66 -1
- office365/sharepoint/webs/regional_settings.py +38 -0
- office365/sharepoint/webs/templates/__init__.py +0 -0
- office365/sharepoint/webs/time_zone.py +1 -1
- office365/sharepoint/webs/web.py +114 -0
- office365/sharepoint/workflow/definition.py +5 -0
- office365/sharepoint/workflow/task.py +5 -0
- office365/sharepoint/workflowservices/deployment_service.py +23 -0
- office365/subscriptions/collection.py +16 -0
- office365/teams/members/settings.py +2 -2
- office365/sharepoint/portal/userprofiles/documents_shared_with_group.py +0 -11
- office365/sharepoint/tenant/administration/internal/web_appservice_principal.py +0 -23
- {Office365_REST_Python_Client-2.5.12.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/LICENSE +0 -0
- {Office365_REST_Python_Client-2.5.12.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/WHEEL +0 -0
- {Office365_REST_Python_Client-2.5.12.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/top_level.txt +0 -0
- /office365/{sharepoint/userprofiles/sharedwithme → backuprestore}/__init__.py +0 -0
- /office365/sharepoint/portal/userprofiles/{documents_shared_with_me.py → documentsshared/with_me.py} +0 -0
- /office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/document_user.py +0 -0
- /office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/item_collection.py +0 -0
- /office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/view_item_removal_result.py +0 -0
|
@@ -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
|
+
)
|
|
File without changes
|
|
@@ -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
|
|
File without changes
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
from office365.sharepoint.entity import Entity
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
class
|
|
4
|
+
class SPOWebAppServicePrincipalPermissionRequest(Entity):
|
|
5
|
+
""" """
|
|
6
|
+
|
|
5
7
|
@property
|
|
6
8
|
def entity_type_name(self):
|
|
7
|
-
return "Microsoft.Online.SharePoint.TenantAdministration.Internal.
|
|
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)
|
|
File without changes
|
|
@@ -4,7 +4,10 @@ from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
|
4
4
|
from office365.runtime.types.collections import StringCollection
|
|
5
5
|
from office365.sharepoint.entity import Entity
|
|
6
6
|
from office365.sharepoint.tenant.administration.smtp_server import SmtpServer
|
|
7
|
-
from office365.sharepoint.tenant.administration.types import
|
|
7
|
+
from office365.sharepoint.tenant.administration.types import (
|
|
8
|
+
AutoQuotaEnabled,
|
|
9
|
+
DisableGroupify,
|
|
10
|
+
)
|
|
8
11
|
|
|
9
12
|
|
|
10
13
|
class TenantAdminSettingsService(Entity):
|
|
@@ -25,6 +28,14 @@ class TenantAdminSettingsService(Entity):
|
|
|
25
28
|
self.context.add_query(qry)
|
|
26
29
|
return return_type
|
|
27
30
|
|
|
31
|
+
@property
|
|
32
|
+
def auto_quota_enabled(self):
|
|
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
|
+
"""
|
|
37
|
+
return self.properties.get("AutoQuotaEnabled", AutoQuotaEnabled())
|
|
38
|
+
|
|
28
39
|
@property
|
|
29
40
|
def available_managed_paths_for_site_creation(self):
|
|
30
41
|
""""""
|
|
@@ -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
|
-
|
|
15
|
-
|
|
14
|
+
is_sync_threshold_limit_reached=None,
|
|
15
|
+
last_refresh_time_stamp=None,
|
|
16
16
|
site_creation_data=None,
|
|
17
|
-
|
|
18
|
-
|
|
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 =
|
|
22
|
-
self.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 =
|
|
27
|
-
self.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):
|
|
@@ -52,6 +52,50 @@ class SiteProperties(Entity):
|
|
|
52
52
|
self._ensure_site_path(_update_ex)
|
|
53
53
|
return return_type
|
|
54
54
|
|
|
55
|
+
@property
|
|
56
|
+
def allow_downloading_non_web_viewable_files(self):
|
|
57
|
+
# type: () -> Optional[bool]
|
|
58
|
+
"""Specifies if non web viewable files can be downloaded."""
|
|
59
|
+
return self.properties.get("AllowDownloadingNonWebViewableFiles", None)
|
|
60
|
+
|
|
61
|
+
@property
|
|
62
|
+
def allow_editing(self):
|
|
63
|
+
# type: () -> Optional[bool]
|
|
64
|
+
"""Prevents users from editing Office files in the browser and copying and pasting Office file contents
|
|
65
|
+
out of the browser window."""
|
|
66
|
+
return self.properties.get("AllowEditing", None)
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def allow_self_service_upgrade(self):
|
|
70
|
+
# type: () -> Optional[bool]
|
|
71
|
+
"""Whether version to version upgrade is allowed on this site."""
|
|
72
|
+
return self.properties.get("AllowSelfServiceUpgrade", None)
|
|
73
|
+
|
|
74
|
+
@property
|
|
75
|
+
def anonymous_link_expiration_in_days(self):
|
|
76
|
+
# type: () -> Optional[int]
|
|
77
|
+
"""Specifies all anonymous/anyone links that have been created
|
|
78
|
+
(or will be created) will expire after the set number of days."""
|
|
79
|
+
return self.properties.get("AnonymousLinkExpirationInDays", None)
|
|
80
|
+
|
|
81
|
+
@property
|
|
82
|
+
def apply_to_existing_document_libraries(self):
|
|
83
|
+
# type: () -> Optional[bool]
|
|
84
|
+
"""Create a job to apply the version history limits setting to existing document libraries."""
|
|
85
|
+
return self.properties.get("ApplyToExistingDocumentLibraries", None)
|
|
86
|
+
|
|
87
|
+
@property
|
|
88
|
+
def apply_to_new_document_libraries(self):
|
|
89
|
+
# type: () -> Optional[bool]
|
|
90
|
+
"""Gets site version policy for new document libraries."""
|
|
91
|
+
return self.properties.get("ApplyToNewDocumentLibraries", None)
|
|
92
|
+
|
|
93
|
+
@property
|
|
94
|
+
def archived_by(self):
|
|
95
|
+
# type: () -> Optional[str]
|
|
96
|
+
"""Gets site version policy for new document libraries."""
|
|
97
|
+
return self.properties.get("ArchivedBy", None)
|
|
98
|
+
|
|
55
99
|
@property
|
|
56
100
|
def deny_add_and_customize_pages(self):
|
|
57
101
|
# type: () -> Optional[int]
|
|
@@ -69,6 +113,7 @@ class SiteProperties(Entity):
|
|
|
69
113
|
@property
|
|
70
114
|
def owner_login_name(self):
|
|
71
115
|
# type: () -> Optional[str]
|
|
116
|
+
""" """
|
|
72
117
|
return self.properties.get("OwnerLoginName", None)
|
|
73
118
|
|
|
74
119
|
@property
|
|
@@ -19,6 +19,9 @@ from office365.sharepoint.lists.render_override_parameters import (
|
|
|
19
19
|
from office365.sharepoint.publishing.portal_health_status import PortalHealthStatus
|
|
20
20
|
from office365.sharepoint.sites.home_sites_details import HomeSitesDetails
|
|
21
21
|
from office365.sharepoint.sites.site import Site
|
|
22
|
+
from office365.sharepoint.tenant.administration.app_billing_properties import (
|
|
23
|
+
SPOAppBillingProperties,
|
|
24
|
+
)
|
|
22
25
|
from office365.sharepoint.tenant.administration.collaboration.insights_data import (
|
|
23
26
|
CollaborationInsightsData,
|
|
24
27
|
)
|
|
@@ -34,6 +37,9 @@ from office365.sharepoint.tenant.administration.insights.onedrive_site_sharing i
|
|
|
34
37
|
from office365.sharepoint.tenant.administration.insights.top_files_sharing import (
|
|
35
38
|
TopFilesSharingInsights,
|
|
36
39
|
)
|
|
40
|
+
from office365.sharepoint.tenant.administration.policies.definition import (
|
|
41
|
+
TenantAdminPolicyDefinition,
|
|
42
|
+
)
|
|
37
43
|
from office365.sharepoint.tenant.administration.powerapps.environment import (
|
|
38
44
|
PowerAppsEnvironment,
|
|
39
45
|
)
|
|
@@ -69,6 +75,7 @@ from office365.sharepoint.tenant.administration.spo_operation import SpoOperatio
|
|
|
69
75
|
from office365.sharepoint.tenant.administration.syntex.billing_context import (
|
|
70
76
|
SyntexBillingContext,
|
|
71
77
|
)
|
|
78
|
+
from office365.sharepoint.tenant.administration.types import CreatePolicyRequest
|
|
72
79
|
from office365.sharepoint.tenant.administration.webs.templates.collection import (
|
|
73
80
|
SPOTenantWebTemplateCollection,
|
|
74
81
|
)
|
|
@@ -84,8 +91,28 @@ class Tenant(Entity):
|
|
|
84
91
|
)
|
|
85
92
|
super(Tenant, self).__init__(context, static_path)
|
|
86
93
|
|
|
94
|
+
def accept_syntex_repository_terms_of_service(self):
|
|
95
|
+
"""
|
|
96
|
+
Used to accept the Microsoft Syntex repository terms of service for your organization.
|
|
97
|
+
This acceptance is often necessary for enabling features related to document processing or repositories
|
|
98
|
+
in Microsoft Syntex.
|
|
99
|
+
"""
|
|
100
|
+
qry = ServiceOperationQuery(self, "AcceptSyntexRepositoryTermsOfService")
|
|
101
|
+
self.context.add_query(qry)
|
|
102
|
+
return self
|
|
103
|
+
|
|
104
|
+
def activate_application_billing_policy(self, billing_policy_id):
|
|
105
|
+
""" """
|
|
106
|
+
payload = {"billingPolicyId": billing_policy_id}
|
|
107
|
+
return_type = ClientResult(self.context, SPOAppBillingProperties())
|
|
108
|
+
qry = ServiceOperationQuery(
|
|
109
|
+
self, "ActivateApplicationBillingPolicy", None, payload, None, return_type
|
|
110
|
+
)
|
|
111
|
+
self.context.add_query(qry)
|
|
112
|
+
return return_type
|
|
113
|
+
|
|
87
114
|
def add_recent_admin_action_report(self):
|
|
88
|
-
""""""
|
|
115
|
+
"""Logs recent administrative actions within a SharePoint Online tenant"""
|
|
89
116
|
return_type = ClientResult(self.context, RecentAdminActionReport())
|
|
90
117
|
payload = {"payload": RecentAdminActionReportPayload()}
|
|
91
118
|
qry = ServiceOperationQuery(
|
|
@@ -117,6 +144,9 @@ class Tenant(Entity):
|
|
|
117
144
|
|
|
118
145
|
def delete_policy_definition(self, item_id):
|
|
119
146
|
"""
|
|
147
|
+
Deletes a policy definition from a Microsoft 365 tenant.
|
|
148
|
+
Policy definitions may refer to specific settings related to compliance, security,
|
|
149
|
+
or site governance (such as site or group creation policies).
|
|
120
150
|
:param int item_id:
|
|
121
151
|
"""
|
|
122
152
|
qry = ServiceOperationQuery(
|
|
@@ -136,6 +166,7 @@ class Tenant(Entity):
|
|
|
136
166
|
return self
|
|
137
167
|
|
|
138
168
|
def get_spo_tenant_all_web_templates(self):
|
|
169
|
+
""" """
|
|
139
170
|
return_type = SPOTenantWebTemplateCollection(self.context)
|
|
140
171
|
qry = ServiceOperationQuery(
|
|
141
172
|
self, "GetSPOTenantAllWebTemplates", None, None, None, return_type
|
|
@@ -144,6 +175,7 @@ class Tenant(Entity):
|
|
|
144
175
|
return return_type
|
|
145
176
|
|
|
146
177
|
def get_onedrive_site_sharing_insights(self, query_mode):
|
|
178
|
+
"""Retrieves insights or reports related to OneDrive for Business site sharing activities"""
|
|
147
179
|
return_type = ClientResult(self.context, OneDriveSiteSharingInsights())
|
|
148
180
|
payload = {"queryMode": query_mode}
|
|
149
181
|
qry = ServiceOperationQuery(
|
|
@@ -225,6 +257,7 @@ class Tenant(Entity):
|
|
|
225
257
|
|
|
226
258
|
def get_home_sites(self):
|
|
227
259
|
# type: () -> ClientResult[ClientValueCollection[HomeSitesDetails]]
|
|
260
|
+
"""Retrieves the Home Site that has been designated for your Microsoft 365 tenant."""
|
|
228
261
|
return_type = ClientResult(
|
|
229
262
|
self.context,
|
|
230
263
|
ClientValueCollection(HomeSitesDetails), # pylint: disable=E1120
|
|
@@ -234,6 +267,7 @@ class Tenant(Entity):
|
|
|
234
267
|
return return_type
|
|
235
268
|
|
|
236
269
|
def get_home_sites_details(self):
|
|
270
|
+
"""Retrieves detailed information about the Home Sites configured in a SharePoint Online tenant."""
|
|
237
271
|
return_type = ClientResult(
|
|
238
272
|
self.context, ClientValueCollection(HomeSitesDetails)
|
|
239
273
|
)
|
|
@@ -263,12 +297,23 @@ class Tenant(Entity):
|
|
|
263
297
|
self.context.add_query(qry)
|
|
264
298
|
return return_type
|
|
265
299
|
|
|
266
|
-
def export_to_csv(
|
|
300
|
+
def export_to_csv(
|
|
301
|
+
self, view_xml=None, time_zone_id=None, columns_info=None, list_name=None
|
|
302
|
+
):
|
|
267
303
|
"""
|
|
304
|
+
Exports tenant-level data to a CSV file.
|
|
268
305
|
:param str view_xml:
|
|
306
|
+
:param int time_zone_id:
|
|
307
|
+
:param list columns_info:
|
|
308
|
+
:param str list_name:
|
|
269
309
|
"""
|
|
270
310
|
return_type = ClientResult(self.context)
|
|
271
|
-
payload = {
|
|
311
|
+
payload = {
|
|
312
|
+
"viewXml": view_xml,
|
|
313
|
+
"timeZoneId": time_zone_id,
|
|
314
|
+
"columnsInfo": columns_info,
|
|
315
|
+
"listName": list_name,
|
|
316
|
+
}
|
|
272
317
|
qry = ServiceOperationQuery(
|
|
273
318
|
self, "ExportToCSV", None, payload, None, return_type
|
|
274
319
|
)
|
|
@@ -330,6 +375,16 @@ class Tenant(Entity):
|
|
|
330
375
|
self.context.add_query(qry)
|
|
331
376
|
return return_type
|
|
332
377
|
|
|
378
|
+
def get_ransomware_events_overview(self):
|
|
379
|
+
# type: () -> ClientResult[AnyStr]
|
|
380
|
+
""" """
|
|
381
|
+
return_type = ClientResult(self.context)
|
|
382
|
+
qry = ServiceOperationQuery(
|
|
383
|
+
self, "GetRansomwareEventsOverview", None, None, None, return_type
|
|
384
|
+
)
|
|
385
|
+
self.context.add_query(qry)
|
|
386
|
+
return return_type
|
|
387
|
+
|
|
333
388
|
def get_sp_list_item_count(self, list_name):
|
|
334
389
|
# type: (str) -> ClientResult[int]
|
|
335
390
|
""" """
|
|
@@ -522,6 +577,16 @@ class Tenant(Entity):
|
|
|
522
577
|
self.context.add_query(qry)
|
|
523
578
|
return self
|
|
524
579
|
|
|
580
|
+
def create_policy_definition(self):
|
|
581
|
+
""" """
|
|
582
|
+
return_type = ClientResult(self.context, TenantAdminPolicyDefinition())
|
|
583
|
+
payload = {"policyInputParameters": CreatePolicyRequest()}
|
|
584
|
+
qry = ServiceOperationQuery(
|
|
585
|
+
self, "CreatePolicyDefinition", None, payload, None, return_type
|
|
586
|
+
)
|
|
587
|
+
self.context.add_query(qry)
|
|
588
|
+
return return_type
|
|
589
|
+
|
|
525
590
|
def create_site(self, url, owner, title=None):
|
|
526
591
|
"""Queues a site collection for creation with the specified properties.
|
|
527
592
|
|
|
@@ -645,9 +710,23 @@ class Tenant(Entity):
|
|
|
645
710
|
self.context.add_query(qry)
|
|
646
711
|
return return_type
|
|
647
712
|
|
|
713
|
+
def get_billing_policy_id_for_app(self, application_id):
|
|
714
|
+
""" """
|
|
715
|
+
return_type = ClientResult(self.context)
|
|
716
|
+
payload = {"applicationId": application_id}
|
|
717
|
+
qry = ServiceOperationQuery(
|
|
718
|
+
self, "GetBillingPolicyIdForApp", None, payload, None, return_type
|
|
719
|
+
)
|
|
720
|
+
self.context.add_query(qry)
|
|
721
|
+
return return_type
|
|
722
|
+
|
|
648
723
|
def connect_site_to_hub_site_by_id(self, site_url, hub_site_id):
|
|
649
724
|
# type: (str, str) -> Self
|
|
650
|
-
"""Connects Site to Hub Site
|
|
725
|
+
"""Connects Site to Hub Site
|
|
726
|
+
|
|
727
|
+
:param str site_url:
|
|
728
|
+
:param str hub_site_id:
|
|
729
|
+
"""
|
|
651
730
|
params = {"siteUrl": site_url, "hubSiteId": hub_site_id}
|
|
652
731
|
qry = ServiceOperationQuery(
|
|
653
732
|
self, "ConnectSiteToHubSiteById", None, params, None, None
|
|
@@ -655,6 +734,12 @@ class Tenant(Entity):
|
|
|
655
734
|
self.context.add_query(qry)
|
|
656
735
|
return self
|
|
657
736
|
|
|
737
|
+
def ensure_brand_center_feature(self):
|
|
738
|
+
"""Ensures that the Brand Center feature is enabled"""
|
|
739
|
+
qry = ServiceOperationQuery(self, "EnsureBrandCenterFeature")
|
|
740
|
+
self.context.add_query(qry)
|
|
741
|
+
return self
|
|
742
|
+
|
|
658
743
|
def send_email(self, site_url):
|
|
659
744
|
# type: (str) -> ClientResult[bool]
|
|
660
745
|
""" """
|
|
@@ -735,6 +820,41 @@ class Tenant(Entity):
|
|
|
735
820
|
""""""
|
|
736
821
|
return self.properties.get("DefaultContentCenterSite", SiteInfoForSitePicker())
|
|
737
822
|
|
|
823
|
+
@property
|
|
824
|
+
def no_access_redirect_url(self):
|
|
825
|
+
# type: () -> Optional[bool]
|
|
826
|
+
"""Specifies the URL of the redirected site for those site collections which have the locked state "NoAccess"""
|
|
827
|
+
return self.properties.get("NoAccessRedirectUrl", None)
|
|
828
|
+
|
|
829
|
+
@property
|
|
830
|
+
def notifications_in_share_point_enabled(self):
|
|
831
|
+
# type: () -> Optional[bool]
|
|
832
|
+
"""Enables or disables notifications in SharePoint."""
|
|
833
|
+
return self.properties.get("NotificationsInSharePointEnabled", None)
|
|
834
|
+
|
|
835
|
+
@property
|
|
836
|
+
def notify_owners_when_invitations_accepted(self):
|
|
837
|
+
# type: () -> Optional[bool]
|
|
838
|
+
"""When this parameter is set to true and when an external user accepts an invitation to a resource
|
|
839
|
+
in a user's OneDrive for Business, the OneDrive for Business owner is notified by e-mail.
|
|
840
|
+
"""
|
|
841
|
+
return self.properties.get("NotifyOwnersWhenInvitationsAccepted", None)
|
|
842
|
+
|
|
843
|
+
@property
|
|
844
|
+
def one_drive_storage_quota(self):
|
|
845
|
+
# type: () -> Optional[int]
|
|
846
|
+
"""Gets a default OneDrive for Business storage quota for the tenant. It will be used for new OneDrive
|
|
847
|
+
for Business sites created."""
|
|
848
|
+
return self.properties.get("OneDriveStorageQuota", None)
|
|
849
|
+
|
|
850
|
+
@property
|
|
851
|
+
def notify_owners_when_items_reshared(self):
|
|
852
|
+
# type: () -> Optional[bool]
|
|
853
|
+
"""When is set to true and another user re-shares a document from a
|
|
854
|
+
user's OneDrive for Business, the OneDrive for Business owner is notified by e-mail.
|
|
855
|
+
"""
|
|
856
|
+
return self.properties.get("NotifyOwnersWhenItemsReshared", None)
|
|
857
|
+
|
|
738
858
|
@property
|
|
739
859
|
def root_site_url(self):
|
|
740
860
|
# type: () -> Optional[str]
|
|
@@ -2,4 +2,32 @@ from office365.runtime.client_value import ClientValue
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
class DisableGroupify(ClientValue):
|
|
5
|
-
""""""
|
|
5
|
+
""" """
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class AutoQuotaEnabled(ClientValue):
|
|
9
|
+
"""Automatic quota management type"""
|
|
10
|
+
|
|
11
|
+
def __init__(self, is_read_only=None, value=None):
|
|
12
|
+
self.IsReadOnly = is_read_only
|
|
13
|
+
self.Value = value
|
|
14
|
+
|
|
15
|
+
@property
|
|
16
|
+
def entity_type_name(self):
|
|
17
|
+
return "Microsoft.Online.SharePoint.TenantAdministration.AutoQuotaEnabled"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class CreatePolicyRequest(ClientValue):
|
|
21
|
+
""" """
|
|
22
|
+
|
|
23
|
+
def __init__(self, is_preview_run=None, policy_custom_name=None):
|
|
24
|
+
"""
|
|
25
|
+
:param bool is_preview_run:
|
|
26
|
+
:param str policy_custom_name:
|
|
27
|
+
"""
|
|
28
|
+
self.isPreviewRun = is_preview_run
|
|
29
|
+
self.policyCustomName = policy_custom_name
|
|
30
|
+
|
|
31
|
+
@property
|
|
32
|
+
def entity_type_name(self):
|
|
33
|
+
return "Microsoft.Online.SharePoint.TenantAdministration.CreatePolicyRequest"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from typing import Optional
|
|
2
2
|
|
|
3
|
+
from office365.runtime.client_result import ClientResult
|
|
3
4
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
4
5
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
5
6
|
from office365.sharepoint.entity import Entity
|
|
@@ -16,6 +17,15 @@ class TenantSettings(Entity):
|
|
|
16
17
|
self.context.add_query(qry)
|
|
17
18
|
return self
|
|
18
19
|
|
|
20
|
+
def get_data_access_governance_report_config(self):
|
|
21
|
+
""" """
|
|
22
|
+
return_type = ClientResult(self.context, str())
|
|
23
|
+
qry = ServiceOperationQuery(
|
|
24
|
+
self, "GetDataAccessGovernanceReportConfig", None, None, None, return_type
|
|
25
|
+
)
|
|
26
|
+
self.context.add_query(qry)
|
|
27
|
+
return return_type
|
|
28
|
+
|
|
19
29
|
def set_corporate_catalog(self, url):
|
|
20
30
|
"""
|
|
21
31
|
:param str url:
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING
|
|
2
|
+
|
|
1
3
|
from office365.runtime.client_result import ClientResult
|
|
2
4
|
from office365.runtime.client_value_collection import ClientValueCollection
|
|
3
5
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
@@ -8,6 +10,9 @@ from office365.sharepoint.files.file import File
|
|
|
8
10
|
from office365.sharepoint.types.resource_path import ResourcePath as SPResPath
|
|
9
11
|
from office365.sharepoint.utilities.principal_info import PrincipalInfo
|
|
10
12
|
|
|
13
|
+
if TYPE_CHECKING:
|
|
14
|
+
from office365.sharepoint.client_context import ClientContext
|
|
15
|
+
|
|
11
16
|
|
|
12
17
|
class Utility(Entity):
|
|
13
18
|
"""
|
|
@@ -161,6 +166,7 @@ class Utility(Entity):
|
|
|
161
166
|
|
|
162
167
|
@staticmethod
|
|
163
168
|
def log_custom_app_error(context, error):
|
|
169
|
+
# type: (ClientContext, str) -> ClientResult[int]
|
|
164
170
|
"""
|
|
165
171
|
Logs an error from a SharePoint Add-in. The return value indicates the success or failure of this operation.
|
|
166
172
|
These errors are of interest to administrators who monitor such apps (2).
|