diff --git a/office365/directory/groups/group.py b/office365/directory/groups/group.py index 3b8ad4de..4866109f 100644 --- a/office365/directory/groups/group.py +++ b/office365/directory/groups/group.py @@ -40,8 +40,9 @@ def add_favorite(self): return self def check_granted_permissions_for_app(self): + """""" return_type = EntityCollection(self.context, ResourceSpecificPermissionGrant) - qry = ServiceOperationQuery(self, "checkGrantedPermissionsForApp", None, None, None, return_type) + qry = ServiceOperationQuery(self, "checkGrantedPermissionsForApp", return_type=return_type) self.context.add_query(qry) return return_type diff --git a/office365/directory/licenses/assigned_plan.py b/office365/directory/licenses/assigned_plan.py index 530c8f96..0f5bf9b0 100644 --- a/office365/directory/licenses/assigned_plan.py +++ b/office365/directory/licenses/assigned_plan.py @@ -6,9 +6,21 @@ class AssignedPlan(ClientValue): The assignedPlans property of both the user entity and the organization entity is a collection of assignedPlan. """ - def __init__(self, assigned_datetime=None): + def __init__(self, assigned_datetime=None, capability_status=None, service=None, service_plan_id=None): """ - :param datetime assigned_datetime: The date and time at which the plan was assigned. + :param datetime.datetime assigned_datetime: The date and time at which the plan was assigned. + :param str capability_status: Condition of the capability assignment. + The possible values are Enabled, Warning, Suspended, Deleted, LockedOut. + See a detailed description of each value. + :param str service: The name of the service; for example, exchange. + :param str service_plan_id: A GUID that identifies the service plan. For a complete list of GUIDs and their + equivalent friendly service names, see Product names and service plan identifiers for licensing. """ self.assignedDateTime = assigned_datetime + self.capabilityStatus = capability_status + self.service = service + self.servicePlanId = service_plan_id + + def __repr__(self): + return self.service diff --git a/office365/directory/permissions/email_identity.py b/office365/directory/permissions/email_identity.py new file mode 100644 index 00000000..a160ae16 --- /dev/null +++ b/office365/directory/permissions/email_identity.py @@ -0,0 +1,5 @@ +from office365.directory.permissions.identity import Identity + + +class EmailIdentity(Identity): + """Represents the email identity of a user.""" diff --git a/office365/directory/permissions/grants/condition_set.py b/office365/directory/permissions/grants/condition_set.py index ae75d574..aa1a6f87 100644 --- a/office365/directory/permissions/grants/condition_set.py +++ b/office365/directory/permissions/grants/condition_set.py @@ -19,6 +19,23 @@ def client_application_ids(self): """ return self.properties.get("clientApplicationIds", StringCollection()) + @property + def client_application_publisher_ids(self): + """ + A list of Microsoft Partner Network (MPN) IDs for verified publishers of the client application, or a list + with the single value all to match with client apps from any publisher. Default is the single value all. + """ + return self.properties.get("clientApplicationPublisherIds", StringCollection()) + + @property + def client_applications_from_verified_publisher_only(self): + """ + Set to true to only match on client applications with a verified publisher. Set to false to match on any client + app, even if it does not have a verified publisher. Default is false. + :rtype: bool + """ + return self.properties.get("clientApplicationsFromVerifiedPublisherOnly", None) + @property def permissions(self): """ @@ -30,3 +47,12 @@ def permissions(self): Default is the single value all. """ return self.properties.get("permissions", StringCollection()) + + @property + def resource_application(self): + """ + The appId of the resource application (e.g. the API) for which a permission is being granted, or any to match + with any resource application or API. Default is any. + :rtype: str + """ + return self.properties.get("resourceApplication", None) diff --git a/office365/directory/permissions/grants/resource_specific.py b/office365/directory/permissions/grants/resource_specific.py index cb87ebe0..92456f24 100644 --- a/office365/directory/permissions/grants/resource_specific.py +++ b/office365/directory/permissions/grants/resource_specific.py @@ -17,3 +17,24 @@ def client_app_id(self): """ID of the service principal of the Azure AD app that has been granted access.""" return self.properties.get("clientAppId", None) + @property + def permission(self): + """The name of the resource-specific permission. + :rtype: str + """ + return self.properties.get("permission", None) + + @property + def permission_type(self): + """The type of permission. Possible values are: Application, Delegated. Read-only. + :rtype: str + """ + return self.properties.get("permissionType", None) + + @property + def resource_app_id(self): + """ID of the Azure AD app that is hosting the resource. Read-only. + :rtype: str + """ + return self.properties.get("resourceAppId", None) + diff --git a/office365/directory/rolemanagement/unified_role_assignment.py b/office365/directory/rolemanagement/unified_role_assignment.py index 02c4280c..e10f6788 100644 --- a/office365/directory/rolemanagement/unified_role_assignment.py +++ b/office365/directory/rolemanagement/unified_role_assignment.py @@ -9,6 +9,24 @@ class UnifiedRoleAssignment(Entity): (for example, a user or a role-assignable group) at a particular scope. """ + @property + def app_scope_id(self): + """ + Identifier of the app-specific scope when the assignment scope is app-specific. Either this property or + directoryScopeId is required. App scopes are scopes that are defined and understood by this application only. + Use / for tenant-wide app scopes. Use directoryScopeId to limit the scope to particular directory objects, + for example, administrative units. Supports $filter (eq, in). + :rtype: str + """ + return self.properties.get("appScopeId", None) + + @property + def condition(self): + """ + :rtype: str + """ + return self.properties.get("condition", None) + @property def role_definition(self): """ diff --git a/office365/directory/security/alerts/alert.py b/office365/directory/security/alerts/alert.py index 19704f59..ab93c9cf 100644 --- a/office365/directory/security/alerts/alert.py +++ b/office365/directory/security/alerts/alert.py @@ -1,4 +1,5 @@ from office365.directory.security.alerts.evidence import AlertEvidence +from office365.directory.security.alerts.history_state import AlertHistoryState from office365.entity import Entity from office365.runtime.client_value_collection import ClientValueCollection @@ -12,3 +13,8 @@ class Alert(Entity): def evidence(self): """Collection of evidence related to the alert.""" return self.properties.get("evidence", ClientValueCollection(AlertEvidence)) + + @property + def history_states(self): + """Collection of changes for the alert.""" + return self.properties.get("historyStates", ClientValueCollection(AlertHistoryState)) diff --git a/office365/directory/security/alerts/history_state.py b/office365/directory/security/alerts/history_state.py new file mode 100644 index 00000000..184b17a0 --- /dev/null +++ b/office365/directory/security/alerts/history_state.py @@ -0,0 +1,5 @@ +from office365.runtime.client_value import ClientValue + + +class AlertHistoryState(ClientValue): + """Stores changes made to alerts.""" diff --git a/office365/directory/security/attacksimulations/automation.py b/office365/directory/security/attacksimulations/automation.py index c3cae47b..2c0ecf88 100644 --- a/office365/directory/security/attacksimulations/automation.py +++ b/office365/directory/security/attacksimulations/automation.py @@ -1,5 +1,21 @@ +from office365.directory.permissions.email_identity import EmailIdentity +from office365.directory.security.attacksimulations.automation_run import SimulationAutomationRun from office365.entity import Entity +from office365.entity_collection import EntityCollection +from office365.runtime.paths.resource_path import ResourcePath class SimulationAutomation(Entity): """Represents simulation automation created to run on a tenant.""" + + @property + def created_by(self): + """Identity of the user who created the attack simulation automation.""" + return self.properties.get('createdBy', EmailIdentity()) + + @property + def runs(self): + """A collection of simulation automation runs.""" + return self.properties.get('runs', + EntityCollection(self.context, SimulationAutomationRun, + ResourcePath("runs", self.resource_path))) diff --git a/office365/directory/security/attacksimulations/automation_run.py b/office365/directory/security/attacksimulations/automation_run.py new file mode 100644 index 00000000..8558bae4 --- /dev/null +++ b/office365/directory/security/attacksimulations/automation_run.py @@ -0,0 +1,5 @@ +from office365.entity import Entity + + +class SimulationAutomationRun(Entity): + """Represents a run of an attack simulation automation on a tenant.""" diff --git a/office365/directory/security/attacksimulations/root.py b/office365/directory/security/attacksimulations/root.py index f65becd1..40cca328 100644 --- a/office365/directory/security/attacksimulations/root.py +++ b/office365/directory/security/attacksimulations/root.py @@ -30,4 +30,3 @@ def get_property(self, name, default_value=None): } default_value = property_mapping.get(name, None) return super(AttackSimulationRoot, self).get_property(name, default_value) - diff --git a/office365/graph_client.py b/office365/graph_client.py index 273d5ace..4af7ae44 100644 --- a/office365/graph_client.py +++ b/office365/graph_client.py @@ -31,7 +31,7 @@ from office365.entity_collection import EntityCollection from office365.search.external.external import External from office365.intune.devices.app_management import DeviceAppManagement -from office365.intune.devices.management import DeviceManagement +from office365.intune.devices.management.management import DeviceManagement from office365.intune.organizations.contact import OrgContact from office365.intune.organizations.organization import Organization from office365.onedrive.admin import Admin diff --git a/office365/intune/audit/actor.py b/office365/intune/audit/actor.py new file mode 100644 index 00000000..7bae0df9 --- /dev/null +++ b/office365/intune/audit/actor.py @@ -0,0 +1,5 @@ +from office365.runtime.client_value import ClientValue + + +class AuditActor(ClientValue): + """A class containing the properties for Audit Actor.""" diff --git a/office365/intune/audit/event.py b/office365/intune/audit/event.py index 19a040c1..4845a286 100644 --- a/office365/intune/audit/event.py +++ b/office365/intune/audit/event.py @@ -1,31 +1,27 @@ from office365.entity import Entity -from office365.entity_collection import EntityCollection -from office365.runtime.client_result import ClientResult -from office365.runtime.queries.function import FunctionQuery -from office365.runtime.types.collections import StringCollection +from office365.intune.audit.actor import AuditActor +from office365.intune.audit.resource import AuditResource +from office365.runtime.client_value_collection import ClientValueCollection class AuditEvent(Entity): """A class containing the properties for Audit Event.""" - -class AuditEventCollection(EntityCollection): - - def __init__(self, context, resource_path=None): - super(AuditEventCollection, self).__init__(context, AuditEvent, resource_path) - - def get_audit_categories(self): - """Not yet documented""" - return_type = ClientResult(self.context, StringCollection()) - qry = FunctionQuery(self, "getAuditCategories", None, return_type) - self.context.add_query(qry) - return return_type - - def get_audit_activity_types(self, category): - """Not yet documented""" - return_type = ClientResult(self.context, StringCollection()) - params = {"category": category} - qry = FunctionQuery(self, "getAuditActivityTypes", params, return_type) - self.context.add_query(qry) - return return_type - + @property + def activity(self): + """Friendly name of the activity. + :rtype: str + """ + return self.properties.get("activity", None) + + @property + def actor(self): + """ + AAD user and application that are associated with the audit event. + """ + return self.properties.get("actor", AuditActor()) + + @property + def resources(self): + """Resources being modified""" + return self.properties.get("resources", ClientValueCollection(AuditResource)) diff --git a/office365/intune/audit/event_collection.py b/office365/intune/audit/event_collection.py new file mode 100644 index 00000000..c6263d87 --- /dev/null +++ b/office365/intune/audit/event_collection.py @@ -0,0 +1,26 @@ +from office365.entity_collection import EntityCollection +from office365.intune.audit.event import AuditEvent +from office365.runtime.client_result import ClientResult +from office365.runtime.queries.function import FunctionQuery +from office365.runtime.types.collections import StringCollection + + +class AuditEventCollection(EntityCollection): + + def __init__(self, context, resource_path=None): + super(AuditEventCollection, self).__init__(context, AuditEvent, resource_path) + + def get_audit_categories(self): + """Not yet documented""" + return_type = ClientResult(self.context, StringCollection()) + qry = FunctionQuery(self, "getAuditCategories", None, return_type) + self.context.add_query(qry) + return return_type + + def get_audit_activity_types(self, category): + """Not yet documented""" + return_type = ClientResult(self.context, StringCollection()) + params = {"category": category} + qry = FunctionQuery(self, "getAuditActivityTypes", params, return_type) + self.context.add_query(qry) + return return_type diff --git a/office365/intune/audit/property.py b/office365/intune/audit/property.py new file mode 100644 index 00000000..373407c6 --- /dev/null +++ b/office365/intune/audit/property.py @@ -0,0 +1,5 @@ +from office365.runtime.client_value import ClientValue + + +class AuditProperty(ClientValue): + """A class containing the properties for Audit Property.""" diff --git a/office365/intune/audit/resource.py b/office365/intune/audit/resource.py new file mode 100644 index 00000000..dc48b3ef --- /dev/null +++ b/office365/intune/audit/resource.py @@ -0,0 +1,11 @@ +from office365.runtime.client_value import ClientValue + + +class AuditResource(ClientValue): + """A class containing the properties for Audit Resource.""" + + def __init__(self, audit_resource_type=None): + """ + :param str audit_resource_type: Audit resource's type. + """ + self.auditResourceType = audit_resource_type diff --git a/office365/intune/devices/management/__init__.py b/office365/intune/devices/management/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/office365/intune/devices/management.py b/office365/intune/devices/management/management.py similarity index 51% rename from office365/intune/devices/management.py rename to office365/intune/devices/management/management.py index 434d8771..ee405a23 100644 --- a/office365/intune/devices/management.py +++ b/office365/intune/devices/management/management.py @@ -1,6 +1,8 @@ from office365.entity import Entity from office365.entity_collection import EntityCollection -from office365.intune.audit.event import AuditEventCollection +from office365.intune.audit.event_collection import AuditEventCollection +from office365.intune.devices.category import DeviceCategory +from office365.intune.devices.enrollment.configuration import DeviceEnrollmentConfiguration from office365.intune.devices.managed import ManagedDevice from office365.runtime.paths.resource_path import ResourcePath @@ -16,7 +18,23 @@ class DeviceManagement(Entity): def audit_events(self): """""" return self.properties.get("auditEvents", AuditEventCollection(self.context, - ResourcePath("auditEvents", self.resource_path))) + ResourcePath("auditEvents", + self.resource_path))) + + @property + def device_categories(self): + """""" + return self.properties.get("deviceCategories", + EntityCollection(self.context, DeviceCategory, ResourcePath("deviceCategories", + self.resource_path))) + + @property + def device_enrollment_configurations(self): + """""" + return self.properties.get('deviceEnrollmentConfigurations', + EntityCollection(self.context, DeviceEnrollmentConfiguration, + ResourcePath("deviceEnrollmentConfigurations", + self.resource_path))) @property def managed_devices(self): @@ -29,6 +47,8 @@ def get_property(self, name, default_value=None): if default_value is None: property_mapping = { "auditEvents": self.audit_events, + "deviceCategories": self.device_categories, + "deviceEnrollmentConfigurations": self.device_enrollment_configurations, "managedDevices": self.managed_devices } default_value = property_mapping.get(name, None) diff --git a/office365/intune/devices/management/settings.py b/office365/intune/devices/management/settings.py new file mode 100644 index 00000000..30231dfc --- /dev/null +++ b/office365/intune/devices/management/settings.py @@ -0,0 +1,5 @@ +from office365.runtime.client_value import ClientValue + + +class DeviceManagementSettings(ClientValue): + """""" diff --git a/office365/intune/organizations/branding.py b/office365/intune/organizations/branding.py new file mode 100644 index 00000000..b0a061a7 --- /dev/null +++ b/office365/intune/organizations/branding.py @@ -0,0 +1,15 @@ +from office365.intune.organizations.branding_properties import OrganizationalBrandingProperties + + +class OrganizationalBranding(OrganizationalBrandingProperties): + """ + Contains details about the organization's default branding. Inherits from organizationalBrandingProperties. + + Organizations can customize their Azure Active Directory (Azure AD) sign-in pages which appear when users sign + in to their organization's tenant-specific apps, or when Azure AD identifies the user's tenant from their username. + A developer can also read the company's branding information and customize their app experience to tailor + it specifically for the signed-in user using their company's branding. + + You can't change your original configuration's language. However, companies can add different branding based on + locale. For language-specific branding, see the organizationalBrandingLocalization object. + """ diff --git a/office365/intune/organizations/organization.py b/office365/intune/organizations/organization.py index 185f4bc3..4ea36ed6 100644 --- a/office365/intune/organizations/organization.py +++ b/office365/intune/organizations/organization.py @@ -1,8 +1,10 @@ from office365.directory.certificates.auth_configuration import CertificateBasedAuthConfiguration from office365.directory.domains.verified import VerifiedDomain +from office365.directory.licenses.assigned_plan import AssignedPlan from office365.directory.object import DirectoryObject from office365.directory.extensions.extension import Extension from office365.entity_collection import EntityCollection +from office365.intune.organizations.branding import OrganizationalBranding from office365.intune.provisioned_plan import ProvisionedPlan from office365.runtime.client_value_collection import ClientValueCollection from office365.runtime.paths.resource_path import ResourcePath @@ -15,6 +17,17 @@ class Organization(DirectoryObject): which operate and are provisioned at the tenant-level. """ + @property + def assigned_plans(self): + """The plans that are assigned to the organization.""" + return self.properties.get('assignedPlans', ClientValueCollection(AssignedPlan)) + + @property + def branding(self): + return self.properties.get('branding', + OrganizationalBranding(self.context, + ResourcePath("branding", self.resource_path))) + @property def business_phones(self): """ @@ -51,6 +64,7 @@ def verified_domains(self): def get_property(self, name, default_value=None): if default_value is None: property_mapping = { + "assignedPlans": self.assigned_plans, "certificateBasedAuthConfiguration": self.certificate_based_auth_configuration, "businessPhones": self.business_phones, "provisionedPlans": self.provisioned_plans, diff --git a/office365/intune/printing/base.py b/office365/intune/printing/base.py new file mode 100644 index 00000000..8e5afddd --- /dev/null +++ b/office365/intune/printing/base.py @@ -0,0 +1,11 @@ +from office365.entity import Entity +from office365.intune.printing.capabilities import PrinterCapabilities + + +class PrinterBase(Entity): + """Represents a base type for printer and printerShare entity types.""" + + @property + def capabilities(self): + """The capabilities of the printer/printerShare.""" + return self.properties.get("", PrinterCapabilities()) diff --git a/office365/intune/printing/capabilities.py b/office365/intune/printing/capabilities.py new file mode 100644 index 00000000..346f624c --- /dev/null +++ b/office365/intune/printing/capabilities.py @@ -0,0 +1,5 @@ +from office365.runtime.client_value import ClientValue + + +class PrinterCapabilities(ClientValue): + """Represents the capabilities reported by a printer/printerShare.""" diff --git a/office365/intune/printing/printer.py b/office365/intune/printing/printer.py new file mode 100644 index 00000000..1b515e73 --- /dev/null +++ b/office365/intune/printing/printer.py @@ -0,0 +1,6 @@ +from office365.intune.printing.base import PrinterBase + + +class Printer(PrinterBase): + """Represents a printer device that has been registered with the Universal Print service. + Printer resources can be used to manage print jobs, printer settings, printer metadata and registration status.""" diff --git a/office365/intune/printing/share.py b/office365/intune/printing/share.py new file mode 100644 index 00000000..b07c4237 --- /dev/null +++ b/office365/intune/printing/share.py @@ -0,0 +1,5 @@ +from office365.intune.printing.base import PrinterBase + + +class PrinterShare(PrinterBase): + """Represents a printer that is intended to be discoverable by users and printing applications.""" diff --git a/office365/intune/vpp_token.py b/office365/intune/vpp_token.py new file mode 100644 index 00000000..3c507baf --- /dev/null +++ b/office365/intune/vpp_token.py @@ -0,0 +1,10 @@ +from office365.entity import Entity + + +class VppToken(Entity): + """ + You purchase multiple licenses for iOS apps through the Apple Volume Purchase Program for Business or Education. + This involves setting up an Apple VPP account from the Apple website and uploading the Apple VPP Business or + Education token to Intune. You can then synchronize your volume purchase information with Intune and track your + volume-purchased app use. You can upload multiple Apple VPP Business or Education tokens. + """ diff --git a/office365/sharepoint/sharing/links/data.py b/office365/sharepoint/sharing/links/data.py index 951a5925..520d4296 100644 --- a/office365/sharepoint/sharing/links/data.py +++ b/office365/sharepoint/sharing/links/data.py @@ -8,10 +8,28 @@ class SharingLinkData(ClientValue): is a tokenized sharing link. """ - def __init__(self, blocks_download=None, description=None): + def __init__(self, blocks_download=None, description=None, embeddable=None, expiration=None, + has_external_guest_invitees=None, is_anonymous=None, is_create_only_link=None, + is_forms_link=None): """ :param bool blocks_download: :param str description: + :param bool embeddable: + :param str expiration: The UTC date/time string with complete representation for calendar date and time of + day which represents the time and date of expiry for the tokenized sharing link + (i.e. is not accessible anymore) + :param bool has_external_guest_invitees: Boolean indicating whether the link URL is a tokenized sharing link + that has any external guest invitees (external users explicitly invited by email address). + :param bool is_anonymous: Boolean indicating if the link is anonymously accessible. + :param bool is_create_only_link: + :param bool is_forms_link: Indicates if the link URL is a tokenized sharing link that supports forms sharing. + This is limited to only tokenized sharing links generated with the Excel Survey feature. """ self.BlocksDownload = blocks_download self.Description = description + self.Embeddable = embeddable + self.Expiration = expiration + self.HasExternalGuestInvitees = has_external_guest_invitees + self.IsAnonymous = is_anonymous + self.IsCreateOnlyLink = is_create_only_link + self.IsFormsLink = is_forms_link diff --git a/office365/sharepoint/sharing/links/info.py b/office365/sharepoint/sharing/links/info.py index db1ec0fc..cdcc7433 100644 --- a/office365/sharepoint/sharing/links/info.py +++ b/office365/sharepoint/sharing/links/info.py @@ -43,7 +43,7 @@ def __str__(self): return self.Url def __repr__(self): - return self.Url + return self.Url or "" @property def entity_type_name(self): diff --git a/office365/sharepoint/sharing/object_sharing_information.py b/office365/sharepoint/sharing/object_sharing_information.py index d99245a5..42000327 100644 --- a/office365/sharepoint/sharing/object_sharing_information.py +++ b/office365/sharepoint/sharing/object_sharing_information.py @@ -110,8 +110,7 @@ def get_list_item_sharing_information(context, list_id, item_id, exclude_current :param str list_id: The list identifier for the list which contains the list item for which the sharing state is requested. :param office365.sharepoint.client_context.ClientContext context: SharePoint client context - :param BaseEntity return_type: Return type - :return: ObjectSharingInformation + :param ObjectSharingInformation return_type: Return type """ binding_type = ObjectSharingInformation(context) payload = { @@ -131,6 +130,70 @@ def get_list_item_sharing_information(context, list_id, item_id, exclude_current context.add_query(qry) return return_type + @property + def anonymous_edit_link(self): + """ + Provides the URL that allows an anonymous user to edit the securable object. + If such a URL is not available, this property will provide an empty string. + + :rtype: str + """ + return self.properties.get('AnonymousEditLink', None) + + @property + def anonymous_view_link(self): + """ + Provides the URL that allows an anonymous user to view the securable object. + If such a URL is not available, this property will provide an empty string. + + :rtype: str + """ + return self.properties.get('AnonymousViewLink', None) + + @property + def can_be_shared(self): + """ + Indicates whether the current securable object can be shared. + :rtype: bool + """ + return self.properties.get('CanBeShared', None) + + @property + def can_be_unshared(self): + """ + Indicates whether the current securable object can be unshared. + :rtype: bool + """ + return self.properties.get('CanBeUnshared', None) + + @property + def can_manage_permissions(self): + """ + Specifies whether the current user is allowed to change the permissions of the securable object. + :rtype: bool + """ + return self.properties.get('CanManagePermissions', None) + + @property + def has_pending_access_requests(self): + """ + Provides information about whether there are any pending access requests for the securable object. + + This information is only provided if the current user has sufficient permissions to view any pending + access requests. If the current user does not have such permissions, this property will return false. + :rtype: bool + """ + return self.properties.get('HasPendingAccessRequests', None) + + @property + def has_permission_levels(self): + """ + Indicates whether the object sharing information contains permissions information in addition to the identities + of the users who have access to the securable object. + :rtype: bool + """ + return self.properties.get('HasPermissionLevels', None) + @property def sharing_links(self): """Indicates the collection of all available sharing links for the securable object.""" diff --git a/office365/sharepoint/sharing/object_sharing_settings.py b/office365/sharepoint/sharing/object_sharing_settings.py index 25510570..d87a0530 100644 --- a/office365/sharepoint/sharing/object_sharing_settings.py +++ b/office365/sharepoint/sharing/object_sharing_settings.py @@ -23,25 +23,38 @@ def web_url(self): def access_request_mode(self): """ Boolean indicating whether the sharing context operates under the access request mode. - :rtype: bool """ return self.properties.get("AccessRequestMode", None) + @property + def block_people_picker_and_sharing(self): + """ + Boolean indicating whether the current user can use the People Picker to do any sharing. + :rtype: bool + """ + return self.properties.get("BlockPeoplePickerAndSharing", None) + @property def can_send_email(self): """ Boolean indicating whether email invitations can be sent. - - :return: bool + :rtype: bool """ return self.properties.get("CanSendEmail", None) + @property + def can_send_link(self): + """ + Boolean indicating whether the current user can make use of Share-By-Link. + :rtype: bool + """ + return self.properties.get("CanSendLink", None) + @property def is_user_site_admin(self): """ Boolean that indicates whether or not the current user is a site collection administrator. - :return: bool """ return self.properties.get("IsUserSiteAdmin", None) diff --git a/office365/sharepoint/tenant/apps/information.py b/office365/sharepoint/tenant/apps/information.py index 7ac93f93..40c56e63 100644 --- a/office365/sharepoint/tenant/apps/information.py +++ b/office365/sharepoint/tenant/apps/information.py @@ -4,10 +4,12 @@ class TenantAppInformation(ClientValue): """Specifies the information for the tenant-scoped app.""" - def __init__(self, app_principal_id=None, app_web_full_url=None): + def __init__(self, app_principal_id=None, app_web_full_url=None, creation_time=None): """ :param str app_principal_id: Specifies the OAuth Id for the tenant-scoped app. :param str app_web_full_url: Specifies the web full URL for the tenant-scoped app. + :param datetime.datetime creation_time: Specifies the creation time for the tenant-scoped app. """ self.AppPrincipalId = app_principal_id self.AppWebFullUrl = app_web_full_url + self.CreationTime = creation_time