Package: azure-mgmt-authorization
Microsoft Azure SDK for PythonThis is the Microsoft Azure Authorization Management Client Library.
This package has been tested with Python 3.7+.
For a more complete view of Azure libraries, see theazure sdk python release.DisclaimerAzure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer tohttps://github.com/Azure/azure-sdk-for-python/issues/20691Getting startedPrerequisitesPython 3.7+ is required to use this package.Azure subscriptionInstall the packagepipinstallazure-mgmt-authorization
pipinstallazure-identityAuthenticationBy default,Azure Active Directorytoken authentication depends on correct configure of following environment variables.AZURE_CLIENT_IDfor Azure client ID.AZURE_TENANT_IDfor Azure tenant ID.AZURE_CLIENT_SECRETfor Azure client secret.In addition, Azure subscription ID can be configured via environment variableAZURE_SUBSCRIPTION_ID.With above configuration, client can be authenticated by following code:fromazure.identityimportDefaultAzureCredentialfromazure.mgmt.authorizationimportAuthorizationManagementClientimportossub_id=os.getenv("AZURE_SUBSCRIPTION_ID")client=AuthorizationManagementClient(credential=DefaultAzureCredential(),subscription_id=sub_id)ExamplesCode samples for this package can be found at:Search Authorization Managementon docs.microsoft.comAzure Python Mgmt SDK Samples RepoTroubleshootingNext stepsProvide FeedbackIf you encounter any bugs or have suggestions, please file an issue in theIssuessection of the project.Release History4.0.0 (2023-07-21)Features AddedAdded operation RoleAssignmentScheduleRequestsOperations.validateAdded operation RoleEligibilityScheduleRequestsOperations.validateModel AlertConfiguration has a new parameter alert_definitionModel AlertConfigurationProperties has a new parameter alert_definitionModel AlertOperationResult has a new parameter created_date_timeModel AlertOperationResult has a new parameter last_action_date_timeModel AlertOperationResult has a new parameter resource_locationModel AlertOperationResult has a new parameter status_detailModel AzureRolesAssignedOutsidePimAlertConfigurationProperties has a new parameter alert_definitionModel DenyAssignment has a new parameter conditionModel DenyAssignment has a new parameter condition_versionModel DenyAssignment has a new parameter created_byModel DenyAssignment has a new parameter created_onModel DenyAssignment has a new parameter updated_byModel DenyAssignment has a new parameter updated_onModel DuplicateRoleCreatedAlertConfigurationProperties has a new parameter alert_definitionModel Permission has a new parameter conditionModel Permission has a new parameter condition_versionModel RoleDefinition has a new parameter created_byModel RoleDefinition has a new parameter created_onModel RoleDefinition has a new parameter updated_byModel RoleDefinition has a new parameter updated_onModel TooManyOwnersAssignedToResourceAlertConfigurationProperties has a new parameter alert_definitionModel TooManyPermanentOwnersAssignedToResourceAlertConfigurationProperties has a new parameter alert_definitionBreaking ChangesRemoved operation AlertOperationOperations.list_for_scope3.1.0b1 (2023-02-15)Features AddedModel AlertConfiguration has a new parameter alert_definitionModel AlertConfigurationProperties has a new parameter alert_definitionModel AzureRolesAssignedOutsidePimAlertConfigurationProperties has a new parameter alert_definitionModel DenyAssignment has a new parameter conditionModel DenyAssignment has a new parameter condition_versionModel DenyAssignment has a new parameter created_byModel DenyAssignment has a new parameter created_onModel DenyAssignment has a new parameter updated_byModel DenyAssignment has a new parameter updated_onModel DuplicateRoleCreatedAlertConfigurationProperties has a new parameter alert_definitionModel RoleDefinition has a new parameter created_byModel RoleDefinition has a new parameter created_onModel RoleDefinition has a new parameter updated_byModel RoleDefinition has a new parameter updated_onModel TooManyOwnersAssignedToResourceAlertConfigurationProperties has a new parameter alert_definitionModel TooManyPermanentOwnersAssignedToResourceAlertConfigurationProperties has a new parameter alert_definition3.0.0 (2022-10-11)Features AddedAdded operation AccessReviewInstancesOperations.createAdded operation group AccessReviewHistoryDefinitionInstanceOperationsAdded operation group AccessReviewHistoryDefinitionInstancesOperationsAdded operation group AccessReviewHistoryDefinitionOperationsAdded operation group AccessReviewHistoryDefinitionsOperationsAdded operation group AccessReviewInstanceContactedReviewersOperationsAdded operation group AlertConfigurationsOperationsAdded operation group AlertDefinitionsOperationsAdded operation group AlertIncidentsOperationsAdded operation group AlertOperationOperationsAdded operation group AlertsOperationsAdded operation group ScopeAccessReviewDefaultSettingsOperationsAdded operation group ScopeAccessReviewHistoryDefinitionInstanceOperationsAdded operation group ScopeAccessReviewHistoryDefinitionInstancesOperationsAdded operation group ScopeAccessReviewHistoryDefinitionOperationsAdded operation group ScopeAccessReviewHistoryDefinitionsOperationsAdded operation group ScopeAccessReviewInstanceContactedReviewersOperationsAdded operation group ScopeAccessReviewInstanceDecisionsOperationsAdded operation group ScopeAccessReviewInstanceOperationsAdded operation group ScopeAccessReviewInstancesOperationsAdded operation group ScopeAccessReviewScheduleDefinitionsOperationsAdded operation group TenantLevelAccessReviewInstanceContactedReviewersOperationsModel AccessReviewDecision has a new parameter insightsModel AccessReviewDecision has a new parameter membership_typesModel AccessReviewDecisionProperties has a new parameter insightsModel AccessReviewDecisionProperties has a new parameter membership_typesModel AccessReviewDefaultSettings has a new parameter recommendation_look_back_durationModel AccessReviewInstance has a new parameter backup_reviewersModel AccessReviewInstance has a new parameter reviewersModel AccessReviewInstance has a new parameter reviewers_typeModel AccessReviewScheduleDefinition has a new parameter exclude_resource_idModel AccessReviewScheduleDefinition has a new parameter exclude_role_definition_idModel AccessReviewScheduleDefinition has a new parameter expand_nested_membershipsModel AccessReviewScheduleDefinition has a new parameter include_access_below_resourceModel AccessReviewScheduleDefinition has a new parameter include_inherited_accessModel AccessReviewScheduleDefinition has a new parameter recommendation_look_back_durationModel AccessReviewScheduleDefinitionProperties has a new parameter exclude_resource_idModel AccessReviewScheduleDefinitionProperties has a new parameter exclude_role_definition_idModel AccessReviewScheduleDefinitionProperties has a new parameter expand_nested_membershipsModel AccessReviewScheduleDefinitionProperties has a new parameter include_access_below_resourceModel AccessReviewScheduleDefinitionProperties has a new parameter include_inherited_accessModel AccessReviewScheduleDefinitionProperties has a new parameter recommendation_look_back_durationModel AccessReviewScheduleSettings has a new parameter recommendation_look_back_durationModel DenyAssignmentPermission has a new parameter conditionModel DenyAssignmentPermission has a new parameter condition_versionBreaking ChangesOperation RoleAssignmentsOperations.list_for_scope has a new parameter skip_tokenRemoved operation RoleAssignmentsOperations.validateRemoved operation RoleAssignmentsOperations.validate_by_id2.0.0 (2021-09-26)FeaturesModel RoleAssignment has a new parameter created_onModel RoleAssignment has a new parameter delegated_managed_identity_resource_idModel RoleAssignment has a new parameter updated_byModel RoleAssignment has a new parameter conditionModel RoleAssignment has a new parameter descriptionModel RoleAssignment has a new parameter updated_onModel RoleAssignment has a new parameter condition_versionModel RoleAssignment has a new parameter created_byAdded operation RoleAssignmentsOperations.validateAdded operation RoleAssignmentsOperations.list_for_subscriptionAdded operation RoleAssignmentsOperations.validate_by_idAdded operation RoleAssignmentsOperations.create_by_idAdded operation RoleAssignmentsOperations.get_by_idAdded operation RoleAssignmentsOperations.delete_by_idAdded operation group AccessReviewInstancesAssignedForMyApprovalOperationsAdded operation group RoleManagementPolicyAssignmentsOperationsAdded operation group EligibleChildResourcesOperationsAdded operation group AccessReviewInstanceDecisionsOperationsAdded operation group RoleAssignmentSchedulesOperationsAdded operation group RoleEligibilityScheduleRequestsOperationsAdded operation group RoleEligibilitySchedulesOperationsAdded operation group RoleAssignmentScheduleInstancesOperationsAdded operation group AccessReviewInstanceMyDecisionsOperationsAdded operation group RoleAssignmentApprovalStepOperationsAdded operation group AccessReviewInstancesOperationsAdded operation group AccessReviewScheduleDefinitionsOperationsAdded operation group ScopeRoleAssignmentApprovalOperationsAdded operation group RoleAssignmentScheduleRequestsOperationsAdded operation group RoleAssignmentApprovalStepsOperationsAdded operation group RoleAssignmentApprovalOperationsAdded operation group ScopeRoleAssignmentApprovalStepsOperationsAdded operation group AccessReviewDefaultSettingsOperationsAdded operation group RoleEligibilityScheduleInstancesOperationsAdded operation group AccessReviewScheduleDefinitionsAssignedForMyApprovalOperationsAdded operation group ScopeRoleAssignmentApprovalStepOperationsAdded operation group RoleAssignmentMetricsOperationsAdded operation group RoleManagementPoliciesOperationsAdded operation group OperationsAdded operation group AccessReviewInstanceOperationsBreaking changesOperation RoleAssignmentsOperations.list_for_resource has a new signatureOperation RoleAssignmentsOperations.delete has a new signatureOperation RoleAssignmentsOperations.get has a new signatureOperation RoleAssignmentsOperations.list_for_resource has a new signatureOperation RoleAssignmentsOperations.list_for_resource_group has a new signatureOperation RoleAssignmentsOperations.list_for_scope has a new signatureModel RoleAssignmentFilter no longer has parameter can_delegateModel RoleAssignment no longer has parameter can_delegateModel Principal has a new signatureModel RoleAssignmentCreateParameters has a new signatureRemoved operation RoleAssignmentsOperations.list1.0.0 (2020-11-23)1.0.0b1 (2020-10-13)This is beta preview version.This version uses a next-generation code generator that introduces important breaking changes, but also important new features (like unified authentication and async programming).General breaking changesCredential system has been completly revamped:azure.common.credentialsormsrestazure.azure_active_directoryinstances are no longer supported, use theazure-identityclasses instead:https://pypi.org/project/azure-identity/credentialsparameter has been renamedcredentialTheconfigattribute no longer exists on a client, configuration should be passed as kwarg. Example:MyClient(credential, subscription_id, enable_logging=True). For a complete set of
supported options, see theparameters accept in init documentation of azure-coreYou can't import aversionmodule anymore, use__version__insteadOperations that used to return amsrest.polling.LROPollernow returns aazure.core.polling.LROPollerand are prefixed withbegin_.Exceptions tree have been simplified and most exceptions are nowazure.core.exceptions.HttpResponseError(CloudErrorhas been removed).Most of the operation kwarg have changed. Some of the most noticeable:rawhas been removed. Equivalent feature can be found usingcls, a callback that will give access to internal HTTP response for advanced userFor a complete set of
supported options, see theparameters accept in Request documentation of azure-coreGeneral new featuresType annotations support usingtyping. SDKs are mypy ready.This client has now stable and official support for async. Check theaionamespace of your package to find the async client.This client now support natively tracing library like OpenCensus or OpenTelemetry. See thistracing quickstartfor an overview.0.61.0 (2020-08-10)FeaturesModel RoleAssignmentCreateParameters has a new parameter conditionModel RoleAssignmentCreateParameters has a new parameter descriptionModel RoleAssignmentCreateParameters has a new parameter condition_versionModel RoleAssignment has a new parameter conditionModel RoleAssignment has a new parameter descriptionModel RoleAssignment has a new parameter condition_version0.60.0 (2019-06-25)Breaking changesRename elevate_access.post to global_administrator.elevate_accessGeneral Breaking changesThis version uses a next-generation code generator thatmightintroduce breaking changes if you were importing from the v20xx_yy_zz
API folders. In summary, some modules were incorrectly
visible/importable and have been renamed. This fixed several issues
caused by usage of classes that were not supposed to be used in the
first place.AuthorizationManagementClient cannot be imported fromazure.mgmt.authorization.v20xx_yy_zz.authorization_management_clientanymore (import fromazure.mgmt.authorization.v20xx_yy_zzworks like before)AuthorizationManagementClientConfiguration import has been moved
fromazure.mgmt.authorization.v20xx_yy_zz.authorization_management_clienttoazure.mgmt.authorization.v20xx_yy_zzA modelMyClassfrom a "models" sub-module cannot be imported
anymore usingazure.mgmt.authorization.v20xx_yy_zz.models.my_class(import
fromazure.mgmt.authorization.v20xx_yy_zz.modelsworks like
before)An operation classMyClassOperationsfrom anoperationssub-module cannot be imported anymore usingazure.mgmt.authorization.v20xx_yy_zz.operations.my_class_operations(import fromazure.mgmt.authorization.v20xx_yy_zz.operationsworks like before)Last but not least, HTTP connection pooling is now enabled by default.
You should always use a client as a context manager, or call close(), or
use no more than one client per process.0.52.0 (2019-05-23)FeaturesAdd elevate_access API0.51.1 (2018-11-27)BugfixesMissing principal_type in role assignment class #38020.51.0 (2018-11-12)FeaturesModel RoleAssignmentCreateParameters has a new parameter
principal_typeBreaking changesParameter role_definition_id of model
RoleAssignmentCreateParameters is now requiredParameter principal_id of model RoleAssignmentCreateParameters is
now requiredRole Assignments API version is now 2018-09-01-preview0.50.0 (2018-05-29)FeaturesSupport Azure Stack (multi API versionning)Client class can be used as a context manager to keep the underlying
HTTP session open for performanceBugfixesCompatibility of the sdist with wheel 0.31.00.40.0 (2018-03-13)Breaking changesSeveral properties have been flattened and "properties" attribute is
not needed anymore (e.g. properties.email_address =>
email_address)Some method signature change (e.g. create_by_id)FeaturesAdding attributes data_actions / not_data_actions /
is_data_actionsAPI version is now 2018-01-01-preview0.30.0 (2017-04-28)Initial ReleaseThis wheel package is built with the azure wheel extension