Office365-REST-Python-Client 2.5.5__py3-none-any.whl → 2.5.6__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.5.dist-info → Office365_REST_Python_Client-2.5.6.dist-info}/METADATA +2 -2
- {Office365_REST_Python_Client-2.5.5.dist-info → Office365_REST_Python_Client-2.5.6.dist-info}/RECORD +202 -182
- office365/booking/virtualevents/__init__.py +0 -0
- office365/booking/virtualevents/root.py +5 -0
- office365/communications/calls/participant.py +4 -5
- office365/directory/applications/application.py +3 -3
- office365/directory/applications/roles/assignment_collection.py +1 -1
- office365/directory/applications/roles/collection.py +2 -2
- office365/directory/authentication/method_configuration.py +9 -0
- office365/directory/authentication/method_mode_detail.py +8 -0
- office365/directory/authentication/method_target.py +5 -0
- office365/directory/authentication/strength_root.py +5 -0
- office365/directory/certificates/auth_configuration.py +1 -3
- office365/directory/groups/group.py +2 -6
- office365/directory/identities/conditional_access_root.py +10 -1
- office365/directory/identities/container.py +3 -9
- office365/directory/identities/providers/builtin_identity.py +3 -2
- office365/directory/identities/providers/saml_or_wsfed.py +4 -5
- office365/directory/identitygovernance/governance.py +14 -3
- office365/directory/identitygovernance/privilegedaccess/__init__.py +0 -0
- office365/directory/identitygovernance/privilegedaccess/root.py +5 -0
- office365/directory/key_credential.py +3 -0
- office365/directory/licenses/assignment_state.py +26 -2
- office365/directory/licenses/details.py +4 -3
- office365/directory/licenses/subscribed_sku.py +8 -10
- office365/directory/object_collection.py +40 -25
- office365/directory/password_credential.py +3 -0
- office365/directory/permissions/default_user_role.py +5 -0
- office365/directory/permissions/grants/condition_set.py +4 -2
- office365/directory/permissions/grants/oauth2.py +7 -10
- office365/directory/policies/authorization.py +50 -3
- office365/directory/policies/permission_grant.py +2 -0
- office365/directory/profile_photo.py +6 -6
- office365/directory/protection/riskyusers/risky_user.py +4 -4
- office365/directory/rolemanagement/resource_action.py +10 -0
- office365/directory/rolemanagement/role_permission.py +10 -0
- office365/directory/security/alerts/alert.py +5 -7
- office365/directory/security/attacksimulations/landing_page.py +5 -0
- office365/directory/security/attacksimulations/operation.py +5 -0
- office365/directory/security/attacksimulations/report.py +8 -1
- office365/directory/security/attacksimulations/root.py +33 -0
- office365/directory/security/attacksimulations/users/__init__.py +0 -0
- office365/directory/security/attacksimulations/users/details.py +5 -0
- office365/directory/security/hunting_query_results.py +5 -0
- office365/directory/security/incidents/incident.py +8 -13
- office365/directory/security/security.py +20 -3
- office365/directory/serviceprincipals/service_principal.py +3 -4
- office365/directory/synchronization/synchronization.py +2 -0
- office365/directory/users/activities/history_item.py +3 -2
- office365/directory/users/user.py +37 -10
- office365/entity_collection.py +3 -2
- office365/graph_client.py +58 -30
- office365/intune/audit/event.py +1 -3
- office365/intune/audit/event_collection.py +1 -1
- office365/intune/devices/alternative_security_id.py +4 -0
- office365/intune/devices/collection.py +57 -0
- office365/intune/devices/device.py +38 -10
- office365/intune/devices/management/management.py +12 -0
- office365/intune/organizations/organization.py +1 -0
- office365/onedrive/analytics/item_activity_stat.py +9 -0
- office365/onedrive/analytics/item_analytics.py +1 -0
- office365/onedrive/contenttypes/content_type.py +4 -12
- office365/onedrive/driveitems/driveItem.py +2 -1
- office365/onedrive/files/hashes.py +5 -0
- office365/onedrive/lists/collection.py +2 -2
- office365/onedrive/operations/long_running.py +6 -6
- office365/onedrive/operations/rich_long_running.py +4 -3
- office365/onedrive/permissions/collection.py +1 -14
- office365/onedrive/sharepoint_settings.py +6 -6
- office365/onedrive/sites/sites_with_root.py +1 -3
- office365/onedrive/termstore/store.py +2 -4
- office365/onedrive/termstore/terms/collection.py +1 -2
- office365/onedrive/workbooks/filter.py +9 -0
- office365/onedrive/workbooks/filter_criteria.py +5 -0
- office365/onedrive/workbooks/functions/functions.py +6 -3
- office365/onedrive/workbooks/functions/result.py +2 -0
- office365/onedrive/workbooks/operations/workbook.py +7 -10
- office365/onedrive/workbooks/tables/pivot_table.py +9 -9
- office365/onedrive/workbooks/worksheets/collection.py +0 -6
- office365/onedrive/workbooks/worksheets/protection.py +2 -0
- office365/outlook/calendar/permissions/permission.py +7 -7
- office365/outlook/calendar/place.py +5 -3
- office365/outlook/mail/attachments/collection.py +6 -1
- office365/outlook/mail/messages/message.py +1 -1
- office365/reports/root.py +50 -4
- office365/runtime/auth/providers/acs_token_provider.py +10 -7
- office365/runtime/auth/sts_profile.py +0 -1
- office365/runtime/client_object.py +18 -14
- office365/runtime/client_object_collection.py +8 -23
- office365/runtime/client_request_exception.py +1 -3
- office365/runtime/client_result.py +11 -14
- office365/runtime/client_runtime_context.py +11 -21
- office365/runtime/odata/json_format.py +4 -7
- office365/runtime/odata/v3/batch_request.py +7 -15
- office365/runtime/odata/v4/batch_request.py +13 -21
- office365/runtime/types/event_handler.py +1 -1
- office365/search/entity.py +3 -2
- office365/sharepoint/activities/facets/delete.py +1 -1
- office365/sharepoint/activities/tracked_item_service.py +2 -3
- office365/sharepoint/administration/web_application.py +8 -7
- office365/sharepoint/audit/audit.py +3 -2
- office365/sharepoint/changes/alert.py +4 -3
- office365/sharepoint/changes/collection.py +7 -10
- office365/sharepoint/changes/content_type.py +4 -4
- office365/sharepoint/changes/field.py +4 -5
- office365/sharepoint/changes/item.py +34 -7
- office365/sharepoint/changes/list.py +4 -4
- office365/sharepoint/changes/user.py +5 -6
- office365/sharepoint/clientsidecomponent/component_context_info.py +4 -3
- office365/sharepoint/contentcenter/machinelearning/enabled.py +4 -3
- office365/sharepoint/contentcenter/machinelearning/hub.py +6 -6
- office365/sharepoint/contentcenter/machinelearning/models/collection.py +1 -1
- office365/sharepoint/contenttypes/fieldlinks/collection.py +4 -6
- office365/sharepoint/contenttypes/fieldlinks/field_link.py +14 -22
- office365/sharepoint/entity.py +12 -5
- office365/sharepoint/entity_collection.py +1 -3
- office365/sharepoint/eventreceivers/definition.py +8 -12
- office365/sharepoint/features/collection.py +1 -2
- office365/sharepoint/features/definitions/definition.py +6 -3
- office365/sharepoint/fields/calculated.py +8 -14
- office365/sharepoint/fields/collection.py +42 -10
- office365/sharepoint/fields/computed.py +4 -5
- office365/sharepoint/fields/currency.py +7 -11
- office365/sharepoint/fields/date_time.py +4 -8
- office365/sharepoint/fields/field.py +6 -16
- office365/sharepoint/fields/lookup.py +11 -9
- office365/sharepoint/fields/multi_choice.py +8 -12
- office365/sharepoint/fields/multi_line_text.py +10 -14
- office365/sharepoint/fields/number.py +13 -26
- office365/sharepoint/fields/rating_scale.py +6 -10
- office365/sharepoint/fields/related_field.py +10 -17
- office365/sharepoint/fields/url.py +4 -5
- office365/sharepoint/fields/user.py +10 -9
- office365/sharepoint/files/collection.py +17 -15
- office365/sharepoint/files/file.py +30 -23
- office365/sharepoint/folders/collection.py +22 -5
- office365/sharepoint/folders/coloring.py +11 -9
- office365/sharepoint/folders/coloring_information.py +38 -0
- office365/sharepoint/folders/folder.py +22 -22
- office365/sharepoint/likes/liked_by_information.py +7 -10
- office365/sharepoint/likes/user_entity.py +6 -8
- office365/sharepoint/listitems/form_update_value.py +17 -1
- office365/sharepoint/listitems/listitem.py +2 -2
- office365/sharepoint/lists/bloom_filter.py +5 -7
- office365/sharepoint/lists/creatables_info.py +5 -6
- office365/sharepoint/lists/list.py +24 -9
- office365/sharepoint/lists/template.py +7 -4
- office365/sharepoint/lists/template_collection.py +2 -4
- office365/sharepoint/marketplace/app_metadata.py +14 -23
- office365/sharepoint/marketplace/sitecollection/appcatalog/allowed_item.py +6 -8
- office365/sharepoint/navigation/node.py +5 -8
- office365/sharepoint/permissions/irm/effective_settings.py +6 -8
- office365/sharepoint/permissions/irm/file_settings.py +8 -6
- office365/sharepoint/permissions/irm/settings.py +25 -43
- office365/sharepoint/portal/groups/site_manager.py +6 -7
- office365/sharepoint/publishing/embed_data_v1.py +8 -15
- office365/sharepoint/publishing/pages/campaign_publication.py +4 -3
- office365/sharepoint/publishing/primary_city_time.py +8 -9
- office365/sharepoint/publishing/video/service_discoverer.py +4 -3
- office365/sharepoint/pushnotifications/subscriber.py +11 -15
- office365/sharepoint/sharing/object_sharing_settings.py +24 -46
- office365/sharepoint/sharing/permission_information.py +5 -5
- office365/sharepoint/sharing/result.py +1 -0
- office365/sharepoint/sitedesigns/run.py +4 -3
- office365/sharepoint/sites/site.py +7 -16
- office365/sharepoint/taxonomy/field.py +32 -21
- office365/sharepoint/taxonomy/groups/group.py +12 -1
- office365/sharepoint/taxonomy/sets/set.py +6 -0
- office365/sharepoint/taxonomy/stores/store.py +4 -2
- office365/sharepoint/teams/channel.py +6 -6
- office365/sharepoint/tenant/administration/endpoints.py +4 -3
- office365/sharepoint/tenant/administration/hubsites/properties.py +4 -5
- office365/sharepoint/tenant/administration/sites/properties.py +0 -1
- office365/sharepoint/tenant/administration/spo_operation.py +4 -4
- office365/sharepoint/tenant/administration/tenant.py +1 -0
- office365/sharepoint/tenant/insights/report.py +11 -0
- office365/sharepoint/tenant/insights/report_manager.py +5 -0
- office365/sharepoint/tenant/insights/report_metadata.py +5 -0
- office365/sharepoint/tenant/settings.py +4 -3
- office365/sharepoint/translation/sync_translator.py +3 -2
- office365/sharepoint/ui/applicationpages/peoplepicker/entity_information.py +4 -4
- office365/sharepoint/usercustomactions/action.py +12 -20
- office365/sharepoint/userprofiles/followed_content.py +6 -10
- office365/sharepoint/userprofiles/people_manager.py +0 -1
- office365/sharepoint/userprofiles/person_properties.py +14 -30
- office365/sharepoint/userprofiles/personal_cache.py +4 -3
- office365/sharepoint/userprofiles/properties_for_user.py +4 -5
- office365/sharepoint/userprofiles/sharedwithme/document.py +12 -21
- office365/sharepoint/utilities/move_copy_util.py +19 -19
- office365/sharepoint/utilities/upload_status.py +7 -10
- office365/sharepoint/views/field_collection.py +9 -14
- office365/sharepoint/views/view.py +43 -64
- office365/sharepoint/webhooks/subscription.py +11 -19
- office365/sharepoint/webparts/webpart.py +3 -1
- office365/sharepoint/webs/modernize_homepage_result.py +4 -3
- office365/sharepoint/webs/regional_settings.py +9 -17
- office365/sharepoint/webs/template.py +3 -5
- office365/sharepoint/webs/web.py +14 -20
- office365/teams/operations/async_operation.py +5 -7
- office365/runtime/paths/item.py +0 -8
- {Office365_REST_Python_Client-2.5.5.dist-info → Office365_REST_Python_Client-2.5.6.dist-info}/LICENSE +0 -0
- {Office365_REST_Python_Client-2.5.5.dist-info → Office365_REST_Python_Client-2.5.6.dist-info}/WHEEL +0 -0
- {Office365_REST_Python_Client-2.5.5.dist-info → Office365_REST_Python_Client-2.5.6.dist-info}/top_level.txt +0 -0
|
File without changes
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.communications.calls.invitation_participant_info import (
|
|
2
4
|
InvitationParticipantInfo,
|
|
3
5
|
)
|
|
@@ -68,9 +70,6 @@ class Participant(Entity):
|
|
|
68
70
|
|
|
69
71
|
@property
|
|
70
72
|
def metadata(self):
|
|
71
|
-
|
|
72
|
-
A blob of data provided by the participant in the roster.
|
|
73
|
-
|
|
74
|
-
:rtype: str
|
|
75
|
-
"""
|
|
73
|
+
# type: () -> Optional[str]
|
|
74
|
+
"""A blob of data provided by the participant in the roster."""
|
|
76
75
|
return self.properties.get("metadata", None)
|
|
@@ -252,9 +252,7 @@ class Application(DirectoryObject):
|
|
|
252
252
|
|
|
253
253
|
@property
|
|
254
254
|
def public_client(self):
|
|
255
|
-
"""
|
|
256
|
-
Specifies settings for installed clients such as desktop or mobile devices.
|
|
257
|
-
"""
|
|
255
|
+
"""Specifies settings for installed clients such as desktop or mobile devices."""
|
|
258
256
|
return self.properties.get("publicClient", PublicClientApplication())
|
|
259
257
|
|
|
260
258
|
@property
|
|
@@ -269,6 +267,7 @@ class Application(DirectoryObject):
|
|
|
269
267
|
|
|
270
268
|
@property
|
|
271
269
|
def created_on_behalf_of(self):
|
|
270
|
+
# type: () -> DirectoryObject
|
|
272
271
|
""""""
|
|
273
272
|
return self.properties.get(
|
|
274
273
|
"createdOnBehalfOf",
|
|
@@ -279,6 +278,7 @@ class Application(DirectoryObject):
|
|
|
279
278
|
|
|
280
279
|
@property
|
|
281
280
|
def owners(self):
|
|
281
|
+
# type: () -> DirectoryObjectCollection
|
|
282
282
|
"""Directory objects that are owners of the application."""
|
|
283
283
|
return self.properties.get(
|
|
284
284
|
"owners",
|
|
@@ -2,7 +2,7 @@ from office365.directory.applications.roles.assignment import AppRoleAssignment
|
|
|
2
2
|
from office365.entity_collection import EntityCollection
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
class AppRoleAssignmentCollection(EntityCollection):
|
|
5
|
+
class AppRoleAssignmentCollection(EntityCollection[AppRoleAssignment]):
|
|
6
6
|
def __init__(self, context, resource_path=None):
|
|
7
7
|
super(AppRoleAssignmentCollection, self).__init__(
|
|
8
8
|
context, AppRoleAssignment, resource_path
|
|
@@ -8,6 +8,6 @@ class AppRoleCollection(ClientValueCollection[AppRole]):
|
|
|
8
8
|
def __init__(self, initial_values=None):
|
|
9
9
|
super(AppRoleCollection, self).__init__(AppRole, initial_values)
|
|
10
10
|
|
|
11
|
-
def __getitem__(self,
|
|
11
|
+
def __getitem__(self, key):
|
|
12
12
|
# type: (str) -> AppRole
|
|
13
|
-
return next(iter([item for item in self._data if item.value ==
|
|
13
|
+
return next(iter([item for item in self._data if item.value == key]), None)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
from office365.entity import Entity
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class AuthenticationMethodConfiguration(Entity):
|
|
5
|
+
"""
|
|
6
|
+
This is an abstract type that represents the settings for each authentication method. It has the configuration
|
|
7
|
+
of whether a specific authentication method is enabled or disabled for the tenant and which users and groups
|
|
8
|
+
can register and use that method.
|
|
9
|
+
"""
|
|
@@ -20,9 +20,7 @@ class CertificateBasedAuthConfiguration(Entity):
|
|
|
20
20
|
|
|
21
21
|
@property
|
|
22
22
|
def certificate_authorities(self):
|
|
23
|
-
"""
|
|
24
|
-
Collection of certificate authorities which creates a trusted certificate chain.
|
|
25
|
-
"""
|
|
23
|
+
"""Collection of certificate authorities which creates a trusted certificate chain."""
|
|
26
24
|
return self.properties.get(
|
|
27
25
|
"certificateAuthorities", ClientValueCollection(CertificateAuthority)
|
|
28
26
|
)
|
|
@@ -380,9 +380,7 @@ class Group(DirectoryObject):
|
|
|
380
380
|
@property
|
|
381
381
|
def permission_grants(self):
|
|
382
382
|
# type: () -> EntityCollection[ResourceSpecificPermissionGrant]
|
|
383
|
-
"""
|
|
384
|
-
List permissions that have been granted to apps to access the group.
|
|
385
|
-
"""
|
|
383
|
+
"""List permissions that have been granted to apps to access the group."""
|
|
386
384
|
return self.properties.setdefault(
|
|
387
385
|
"permissionGrants",
|
|
388
386
|
EntityCollection(
|
|
@@ -394,9 +392,7 @@ class Group(DirectoryObject):
|
|
|
394
392
|
|
|
395
393
|
@property
|
|
396
394
|
def photo(self):
|
|
397
|
-
"""
|
|
398
|
-
The group's profile photo
|
|
399
|
-
"""
|
|
395
|
+
"""The group's profile photo"""
|
|
400
396
|
return self.properties.get(
|
|
401
397
|
"photo",
|
|
402
398
|
ProfilePhoto(self.context, ResourcePath("photo", self.resource_path)),
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
from office365.entity import Entity
|
|
2
|
+
from office365.runtime.paths.resource_path import ResourcePath
|
|
2
3
|
|
|
3
4
|
|
|
4
5
|
class ConditionalAccessRoot(Entity):
|
|
5
6
|
"""The conditionalAccessRoot resource is the entry point for the Conditional Access (CA) object model.
|
|
6
7
|
It doesn't contain any usable properties."""
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
@property
|
|
10
|
+
def authentication_strength(self):
|
|
11
|
+
"""The entry point for the Conditional Access (CA) object model."""
|
|
12
|
+
return self.properties.get(
|
|
13
|
+
"authenticationStrength",
|
|
14
|
+
ConditionalAccessRoot(
|
|
15
|
+
self.context, ResourcePath("authenticationStrength", self.resource_path)
|
|
16
|
+
),
|
|
17
|
+
)
|
|
@@ -18,9 +18,7 @@ class IdentityContainer(Entity):
|
|
|
18
18
|
|
|
19
19
|
@property
|
|
20
20
|
def api_connectors(self):
|
|
21
|
-
"""
|
|
22
|
-
Represents entry point for API connectors.
|
|
23
|
-
"""
|
|
21
|
+
"""Represents entry point for API connectors."""
|
|
24
22
|
return self.properties.get(
|
|
25
23
|
"apiConnectors",
|
|
26
24
|
EntityCollection(
|
|
@@ -52,9 +50,7 @@ class IdentityContainer(Entity):
|
|
|
52
50
|
|
|
53
51
|
@property
|
|
54
52
|
def b2x_user_flows(self):
|
|
55
|
-
"""
|
|
56
|
-
Represents entry point for B2X/self-service sign-up identity userflows.
|
|
57
|
-
"""
|
|
53
|
+
"""Represents entry point for B2X/self-service sign-up identity userflows."""
|
|
58
54
|
return self.properties.get(
|
|
59
55
|
"b2xUserFlows",
|
|
60
56
|
EntityCollection(
|
|
@@ -66,9 +62,7 @@ class IdentityContainer(Entity):
|
|
|
66
62
|
|
|
67
63
|
@property
|
|
68
64
|
def user_flow_attributes(self):
|
|
69
|
-
"""
|
|
70
|
-
Represents entry point for identity userflow attributes.
|
|
71
|
-
"""
|
|
65
|
+
"""Represents entry point for identity userflow attributes."""
|
|
72
66
|
return self.properties.get(
|
|
73
67
|
"userFlowAttributes",
|
|
74
68
|
EntityCollection(
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.directory.identities.providers.base import IdentityProviderBase
|
|
2
4
|
|
|
3
5
|
|
|
@@ -8,9 +10,8 @@ class BuiltInIdentityProvider(IdentityProviderBase):
|
|
|
8
10
|
|
|
9
11
|
@property
|
|
10
12
|
def identity_provider_type(self):
|
|
13
|
+
# type: () -> Optional[str]
|
|
11
14
|
"""
|
|
12
15
|
The identity provider type. For a B2B scenario, possible values: AADSignup, MicrosoftAccount, EmailOTP.
|
|
13
|
-
|
|
14
|
-
:rtype: str
|
|
15
16
|
"""
|
|
16
17
|
return self.properties.get("identityProviderType", None)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.directory.identities.providers.base import IdentityProviderBase
|
|
2
4
|
|
|
3
5
|
|
|
@@ -7,9 +9,6 @@ class SamlOrWsFedProvider(IdentityProviderBase):
|
|
|
7
9
|
|
|
8
10
|
@property
|
|
9
11
|
def issuer_uri(self):
|
|
10
|
-
|
|
11
|
-
Issuer URI of the federation server.
|
|
12
|
-
|
|
13
|
-
:rtype: str
|
|
14
|
-
"""
|
|
12
|
+
# type: () -> Optional[str]
|
|
13
|
+
"""Issuer URI of the federation server."""
|
|
15
14
|
return self.properties.get("issuerUri", None)
|
|
@@ -2,6 +2,9 @@ from office365.directory.identitygovernance.accessreview.set import AccessReview
|
|
|
2
2
|
from office365.directory.identitygovernance.appconsent.approval_route import (
|
|
3
3
|
AppConsentApprovalRoute,
|
|
4
4
|
)
|
|
5
|
+
from office365.directory.identitygovernance.privilegedaccess.root import (
|
|
6
|
+
PrivilegedAccessRoot,
|
|
7
|
+
)
|
|
5
8
|
from office365.directory.identitygovernance.termsofuse.container import (
|
|
6
9
|
TermsOfUseContainer,
|
|
7
10
|
)
|
|
@@ -35,9 +38,7 @@ class IdentityGovernance(Entity):
|
|
|
35
38
|
|
|
36
39
|
@property
|
|
37
40
|
def access_reviews(self):
|
|
38
|
-
"""
|
|
39
|
-
Container for the base resources that expose the access reviews API and features.
|
|
40
|
-
"""
|
|
41
|
+
"""Container for the base resources that expose the access reviews API and features."""
|
|
41
42
|
return self.properties.get(
|
|
42
43
|
"accessReviews",
|
|
43
44
|
AccessReviewSet(
|
|
@@ -45,6 +46,16 @@ class IdentityGovernance(Entity):
|
|
|
45
46
|
),
|
|
46
47
|
)
|
|
47
48
|
|
|
49
|
+
@property
|
|
50
|
+
def privileged_access(self):
|
|
51
|
+
"""Container for the base resources that expose the access reviews API and features."""
|
|
52
|
+
return self.properties.get(
|
|
53
|
+
"privilegedAccess",
|
|
54
|
+
PrivilegedAccessRoot(
|
|
55
|
+
self.context, ResourcePath("privilegedAccess", self.resource_path)
|
|
56
|
+
),
|
|
57
|
+
)
|
|
58
|
+
|
|
48
59
|
@property
|
|
49
60
|
def terms_of_use(self):
|
|
50
61
|
"""
|
|
File without changes
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from office365.runtime.client_value import ClientValue
|
|
2
|
+
from office365.runtime.types.collections import StringCollection
|
|
2
3
|
|
|
3
4
|
|
|
4
5
|
class LicenseAssignmentState(ClientValue):
|
|
@@ -12,8 +13,31 @@ class LicenseAssignmentState(ClientValue):
|
|
|
12
13
|
- Error details if the assignment state is Error
|
|
13
14
|
"""
|
|
14
15
|
|
|
15
|
-
def __init__(
|
|
16
|
+
def __init__(
|
|
17
|
+
self,
|
|
18
|
+
assigned_by_group=None,
|
|
19
|
+
disabled_plans=None,
|
|
20
|
+
error=None,
|
|
21
|
+
lastUpdatedDateTime=None,
|
|
22
|
+
skuId=None,
|
|
23
|
+
state=None,
|
|
24
|
+
):
|
|
16
25
|
"""
|
|
17
|
-
:param str assigned_by_group:
|
|
26
|
+
:param str assigned_by_group: ndicates whether the license is directly assigned or inherited from a group.
|
|
27
|
+
If directly assigned, this field is null; if inherited through a group membership, this field contains
|
|
28
|
+
the ID of the group.
|
|
29
|
+
:param list[str] disabled_plans: The service plans that are disabled in this assignment
|
|
30
|
+
:param str error: License assignment failure error. If the license is assigned successfully, this field is Null.
|
|
31
|
+
The possible values are CountViolation, MutuallyExclusiveViolation, DependencyViolation,
|
|
32
|
+
ProhibitedInUsageLocationViolation, UniquenessViolation, and Other.
|
|
33
|
+
For more information on how to identify and resolve license assignment errors, see here.
|
|
34
|
+
:param str skuId: The unique identifier for the SKU. Read-Only.
|
|
35
|
+
:param str state: Indicate the current state of this assignment. Read-Only.
|
|
36
|
+
The possible values are Active, ActiveWithError, Disabled, and Error.
|
|
18
37
|
"""
|
|
19
38
|
self.assignedByGroup = assigned_by_group
|
|
39
|
+
self.disabledPlans = StringCollection(disabled_plans)
|
|
40
|
+
self.error = error
|
|
41
|
+
self.lastUpdatedDateTime = lastUpdatedDateTime
|
|
42
|
+
self.skuId = skuId
|
|
43
|
+
self.state = state
|
|
@@ -8,11 +8,12 @@ from office365.runtime.client_value_collection import ClientValueCollection
|
|
|
8
8
|
class LicenseDetails(Entity):
|
|
9
9
|
"""Contains information about a license assigned to a user."""
|
|
10
10
|
|
|
11
|
+
def __repr__(self):
|
|
12
|
+
return self.sku_part_number or self.entity_type_name
|
|
13
|
+
|
|
11
14
|
@property
|
|
12
15
|
def service_plans(self):
|
|
13
|
-
"""
|
|
14
|
-
Information about the service plans assigned with the license. Read-only, Not nullable
|
|
15
|
-
"""
|
|
16
|
+
"""Information about the service plans assigned with the license. Read-only, Not nullable"""
|
|
16
17
|
return self.properties.get(
|
|
17
18
|
"servicePlans", ClientValueCollection(ServicePlanInfo)
|
|
18
19
|
)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.directory.licenses.service_plan_info import ServicePlanInfo
|
|
2
4
|
from office365.directory.licenses.units_detail import LicenseUnitsDetail
|
|
3
5
|
from office365.entity import Entity
|
|
@@ -9,35 +11,31 @@ class SubscribedSku(Entity):
|
|
|
9
11
|
|
|
10
12
|
@property
|
|
11
13
|
def account_id(self):
|
|
12
|
-
|
|
13
|
-
The unique ID of the account this SKU belongs to.
|
|
14
|
-
:rtype: str
|
|
15
|
-
"""
|
|
14
|
+
# type: () -> Optional[str]
|
|
15
|
+
"""The unique ID of the account this SKU belongs to."""
|
|
16
16
|
return self.properties.get("accountId", None)
|
|
17
17
|
|
|
18
18
|
@property
|
|
19
19
|
def applies_to(self):
|
|
20
|
+
# type: () -> Optional[str]
|
|
20
21
|
"""
|
|
21
22
|
The target class for this SKU. Only SKUs with target class User are assignable.
|
|
22
23
|
Possible values are: "User", "Company".
|
|
23
|
-
:rtype: str
|
|
24
24
|
"""
|
|
25
25
|
return self.properties.get("appliesTo", None)
|
|
26
26
|
|
|
27
27
|
@property
|
|
28
28
|
def sku_id(self):
|
|
29
|
-
|
|
30
|
-
The unique identifier (GUID) for the service SKU.
|
|
31
|
-
:rtype: str
|
|
32
|
-
"""
|
|
29
|
+
# type: () -> Optional[str]
|
|
30
|
+
"""The unique identifier (GUID) for the service SKU."""
|
|
33
31
|
return self.properties.get("skuId", None)
|
|
34
32
|
|
|
35
33
|
@property
|
|
36
34
|
def sku_part_number(self):
|
|
35
|
+
# type: () -> Optional[str]
|
|
37
36
|
"""
|
|
38
37
|
The SKU part number; for example: "AAD_PREMIUM" or "RMSBASIC".
|
|
39
38
|
To get a list of commercial subscriptions that an organization has acquired, see List subscribedSkus.
|
|
40
|
-
:rtype: str
|
|
41
39
|
"""
|
|
42
40
|
return self.properties.get("skuPartNumber", None)
|
|
43
41
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
from typing_extensions import Self
|
|
2
|
+
|
|
1
3
|
from office365.delta_collection import DeltaCollection
|
|
2
4
|
from office365.directory.object import DirectoryObject
|
|
3
5
|
from office365.entity_collection import EntityCollection
|
|
4
|
-
from office365.runtime.client_result import ClientResult
|
|
5
6
|
from office365.runtime.http.http_method import HttpMethod
|
|
6
7
|
from office365.runtime.http.request_options import RequestOptions
|
|
7
8
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
@@ -15,29 +16,32 @@ class DirectoryObjectCollection(DeltaCollection[DirectoryObject]):
|
|
|
15
16
|
context, DirectoryObject, resource_path
|
|
16
17
|
)
|
|
17
18
|
|
|
18
|
-
def get_by_ids(self, ids):
|
|
19
|
+
def get_by_ids(self, ids, types=None):
|
|
19
20
|
"""
|
|
20
21
|
Returns the directory objects specified in a list of IDs.
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
:param list[str] ids: A collection of IDs for which to return objects. The IDs are GUIDs, represented as
|
|
23
|
+
strings. You can specify up to 1000 IDs.
|
|
24
|
+
:param list[str] types: A collection of resource types that specifies the set of resource collections to search.
|
|
25
|
+
If not specified, the default is directoryObject, which contains all of the resource types defined in
|
|
26
|
+
the directory. Any object that derives from directoryObject may be specified in the collection;
|
|
27
|
+
for example: user, group, and device objects.
|
|
23
28
|
"""
|
|
24
|
-
return_type =
|
|
25
|
-
params = {"ids": ids}
|
|
29
|
+
return_type = DirectoryObjectCollection(self.context)
|
|
30
|
+
params = {"ids": ids, "types": types}
|
|
26
31
|
qry = ServiceOperationQuery(self, "getByIds", params, None, None, return_type)
|
|
27
32
|
self.context.add_query(qry)
|
|
28
33
|
return return_type
|
|
29
34
|
|
|
30
|
-
def add(self,
|
|
31
|
-
|
|
32
|
-
|
|
35
|
+
def add(self, directory_object):
|
|
36
|
+
# type: (DirectoryObject) -> Self
|
|
37
|
+
"""Adds directory objects to the collection."""
|
|
33
38
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
self.context.add_query(qry)
|
|
39
|
+
def _add():
|
|
40
|
+
payload = {"@odata.id": directory_object.resource_url}
|
|
41
|
+
qry = ServiceOperationQuery(self, "$ref", None, payload)
|
|
42
|
+
self.context.add_query(qry)
|
|
43
|
+
|
|
44
|
+
directory_object.ensure_property("id", _add)
|
|
41
45
|
return self
|
|
42
46
|
|
|
43
47
|
def get_available_extension_properties(self, is_synced_from_on_premises=None):
|
|
@@ -60,19 +64,30 @@ class DirectoryObjectCollection(DeltaCollection[DirectoryObject]):
|
|
|
60
64
|
self.context.add_query(qry)
|
|
61
65
|
return return_type
|
|
62
66
|
|
|
63
|
-
def remove(self,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
:param str
|
|
67
|
+
def remove(self, directory_object):
|
|
68
|
+
# type: (DirectoryObject|str) -> Self
|
|
69
|
+
"""Removes directory object from the collection.
|
|
70
|
+
:param str directory_object: Directory object or identifier
|
|
67
71
|
"""
|
|
68
72
|
|
|
69
|
-
|
|
73
|
+
def _remove(id_):
|
|
74
|
+
qry = ServiceOperationQuery(self, "{0}/$ref".format(id_))
|
|
75
|
+
|
|
76
|
+
def _construct_request(request):
|
|
77
|
+
# type: (RequestOptions) -> None
|
|
78
|
+
request.method = HttpMethod.Delete
|
|
79
|
+
|
|
80
|
+
self.context.add_query(qry).before_query_execute(_construct_request)
|
|
81
|
+
|
|
82
|
+
if isinstance(directory_object, DirectoryObject):
|
|
83
|
+
|
|
84
|
+
def _loaded():
|
|
85
|
+
_remove(directory_object.id)
|
|
70
86
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
87
|
+
directory_object.ensure_property("id", _loaded)
|
|
88
|
+
else:
|
|
89
|
+
_remove(directory_object)
|
|
74
90
|
|
|
75
|
-
self.context.add_query(qry).before_query_execute(_construct_request)
|
|
76
91
|
return self
|
|
77
92
|
|
|
78
93
|
def validate_properties(
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.entity import Entity
|
|
2
4
|
from office365.runtime.types.collections import StringCollection
|
|
3
5
|
|
|
@@ -29,10 +31,10 @@ class PermissionGrantConditionSet(Entity):
|
|
|
29
31
|
|
|
30
32
|
@property
|
|
31
33
|
def client_applications_from_verified_publisher_only(self):
|
|
34
|
+
# type: () -> Optional[bool]
|
|
32
35
|
"""
|
|
33
36
|
Set to true to only match on client applications with a verified publisher. Set to false to match on any client
|
|
34
37
|
app, even if it does not have a verified publisher. Default is false.
|
|
35
|
-
:rtype: bool
|
|
36
38
|
"""
|
|
37
39
|
return self.properties.get("clientApplicationsFromVerifiedPublisherOnly", None)
|
|
38
40
|
|
|
@@ -50,9 +52,9 @@ class PermissionGrantConditionSet(Entity):
|
|
|
50
52
|
|
|
51
53
|
@property
|
|
52
54
|
def resource_application(self):
|
|
55
|
+
# type: () -> Optional[str]
|
|
53
56
|
"""
|
|
54
57
|
The appId of the resource application (e.g. the API) for which a permission is being granted, or any to match
|
|
55
58
|
with any resource application or API. Default is any.
|
|
56
|
-
:rtype: str
|
|
57
59
|
"""
|
|
58
60
|
return self.properties.get("resourceApplication", None)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.entity import Entity
|
|
2
4
|
|
|
3
5
|
|
|
@@ -13,56 +15,51 @@ class OAuth2PermissionGrant(Entity):
|
|
|
13
15
|
|
|
14
16
|
@property
|
|
15
17
|
def client_id(self):
|
|
18
|
+
# type: () -> Optional[str]
|
|
16
19
|
"""
|
|
17
20
|
The id of the client service principal for the application which is authorized to act on behalf of a signed-in
|
|
18
21
|
user when accessing an API. Required. Supports $filter (eq only).
|
|
19
|
-
|
|
20
|
-
:rtype: str
|
|
21
22
|
"""
|
|
22
23
|
return self.properties.get("clientId", None)
|
|
23
24
|
|
|
24
25
|
@property
|
|
25
26
|
def consent_type(self):
|
|
27
|
+
# type: () -> Optional[str]
|
|
26
28
|
"""
|
|
27
29
|
Indicates if authorization is granted for the client application to impersonate all users or only a
|
|
28
30
|
specific user. AllPrincipals indicates authorization to impersonate all users.
|
|
29
31
|
Principal indicates authorization to impersonate a specific user. Consent on behalf of all users can be granted
|
|
30
32
|
by an administrator. Non-admin users may be authorized to consent on behalf of themselves in some cases,
|
|
31
33
|
for some delegated permissions. Required. Supports $filter (eq only).
|
|
32
|
-
|
|
33
|
-
:rtype: str
|
|
34
34
|
"""
|
|
35
35
|
return self.properties.get("consentType", None)
|
|
36
36
|
|
|
37
37
|
@property
|
|
38
38
|
def principal_id(self):
|
|
39
|
+
# type: () -> Optional[str]
|
|
39
40
|
"""
|
|
40
41
|
The id of the user on behalf of whom the client is authorized to access the resource, when consentType is
|
|
41
42
|
Principal. If consentType is AllPrincipals this value is null. Required when consentType is Principal.
|
|
42
43
|
Supports $filter (eq only).
|
|
43
|
-
|
|
44
|
-
:rtype: str
|
|
45
44
|
"""
|
|
46
45
|
return self.properties.get("principalId", None)
|
|
47
46
|
|
|
48
47
|
@property
|
|
49
48
|
def resource_id(self):
|
|
49
|
+
# type: () -> Optional[str]
|
|
50
50
|
"""
|
|
51
51
|
The id of the resource service principal to which access is authorized. This identifies the API which the
|
|
52
52
|
client is authorized to attempt to call on behalf of a signed-in user. Supports $filter (eq only).
|
|
53
|
-
|
|
54
|
-
:rtype: str
|
|
55
53
|
"""
|
|
56
54
|
return self.properties.get("resourceId", None)
|
|
57
55
|
|
|
58
56
|
@property
|
|
59
57
|
def scope(self):
|
|
58
|
+
# type: () -> Optional[str]
|
|
60
59
|
"""
|
|
61
60
|
A space-separated list of the claim values for delegated permissions which should be included in access tokens
|
|
62
61
|
for the resource application (the API). For example, openid User.Read GroupMember.Read.All. Each claim value
|
|
63
62
|
should match the value field of one of the delegated permissions defined by the API, listed in the
|
|
64
63
|
oauth2PermissionScopes property of the resource service principal. Must not exceed 3850 characters in length.
|
|
65
|
-
|
|
66
|
-
:rtype: str
|
|
67
64
|
"""
|
|
68
65
|
return self.properties.get("scope", None)
|