class AccessReviewScope
An abstract base class representing the scope of entities to be reviewed in an access review schedule definition within Microsoft Graph API.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/directory/identitygovernance/accessreview/scope.py
4 - 16
simple
Purpose
AccessReviewScope serves as an abstract base type for defining what entities are reviewed in an accessReviewScheduleDefinition. It is inherited by concrete implementations like accessReviewQueryScope, principalResourceMembershipsScope, and accessReviewReviewerScope. This class is used to specify the scope property on an accessReviewScheduleDefinition or the reviewers property, depending on the concrete implementation. It provides a common interface for different types of access review scopes in Microsoft 365 governance scenarios.
Source Code
class AccessReviewScope(ClientValue):
"""
The accessReviewScope defines what entities are reviewed in an accessReviewScheduleDefinition. It's an abstract type
that is inherited by accessReviewQueryScope, principalResourceMembershipsScope, and accessReviewReviewerScope.
For scope property on an accessReviewScheduleDefinition see accessReviewQueryScope and
principalResourceMembershipsScope.
For reviewers property on an accessReviewScheduleDefinition see accessReviewReviewerScope.
Specifying the OData type in the scope is highly recommended for all types but required for
principalResourceMembershipsScope and accessReviewInactiveUserQueryScope.
"""
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
ClientValue | - |
Parameter Details
No explicit __init__ parameters: This class inherits from ClientValue and does not define its own __init__ method. It uses the parent class constructor. Concrete subclasses may define their own initialization parameters specific to their scope type.
Return Value
Instantiation returns an AccessReviewScope object (or more commonly, an instance of one of its concrete subclasses). This object represents a scope definition that can be used in access review configurations. The object inherits ClientValue behavior for serialization and deserialization with Microsoft Graph API.
Class Interface
Dependencies
office365
Required Imports
from office365.runtime.client_value import ClientValue
from office365.entity_collections.access_review_scope import AccessReviewScope
Usage Example
# AccessReviewScope is abstract, use concrete implementations instead
# Example with a hypothetical concrete subclass:
from office365.entity_collections.access_review_scope import AccessReviewScope
from office365.graph_client import GraphClient
# Authenticate to Microsoft Graph
client = GraphClient.with_credentials(tenant_id, client_id, client_secret)
# Typically used as part of an access review schedule definition
# The concrete subclass would be instantiated with specific parameters
# For example, accessReviewQueryScope might be used like:
# scope = AccessReviewQueryScope()
# scope.query = "/groups/{group-id}/members"
# scope.queryType = "MicrosoftGraph"
# Then used in a schedule definition:
# schedule_definition = AccessReviewScheduleDefinition()
# schedule_definition.scope = scope
# client.access_review_schedule_definitions.add(schedule_definition).execute_query()
Best Practices
- Do not instantiate AccessReviewScope directly as it is an abstract base class; use concrete implementations like accessReviewQueryScope or principalResourceMembershipsScope
- Always specify the OData type when using scope definitions, especially for principalResourceMembershipsScope and accessReviewInactiveUserQueryScope where it is required
- Use accessReviewQueryScope and principalResourceMembershipsScope for the scope property on accessReviewScheduleDefinition
- Use accessReviewReviewerScope for the reviewers property on accessReviewScheduleDefinition
- Ensure proper authentication and permissions are configured before attempting to create or modify access review scopes
- Validate that your Microsoft 365 tenant has access review capabilities enabled before using this class hierarchy
- Follow Microsoft Graph API documentation for specific requirements of each concrete scope type
Tags
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class AccessReviewSet 72.9% similar
-
class AccessReviewHistoryDefinition 71.5% similar
-
class AccessReviewScheduleSettings 67.9% similar
-
class PermissionScope 63.0% similar
-
class PatternedRecurrence 55.0% similar