The `azure-graphrbac` client library for Python provided an interface to manage Azure Active Directory (Azure AD) resources, such as users, groups, and service principals, through the Azure AD Graph API. This library is effectively abandoned due to the deprecation and upcoming retirement of the underlying Azure AD Graph API, which was superseded by Microsoft Graph. The last release was in August 2020, and it is no longer actively maintained.
pip install azure-graphrbacVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to instantiate `GraphRbacManagementClient` using a service principal and list users. Ensure your service principal has appropriate permissions (e.g., 'User.Read.All') in Azure AD. This library relies on the now-deprecated Azure AD Graph API.
Migrate all functionality to use the Microsoft Graph API. The recommended Python SDK for Microsoft Graph is `microsoft-graph-sdk` or using `requests` with `azure-identity` to call the Microsoft Graph REST API directly.
Use the Microsoft Graph API for all new development concerning Azure Active Directory resources. Consider `azure-identity` for authentication and `microsoft-graph-sdk` or direct REST API calls for resource management.
If you must use `azure-graphrbac` for legacy reasons, continue to use `msrestazure.azure_active_directory.ServicePrincipalCredentials` for authentication. For modern applications, migrate to Microsoft Graph and its compatible authentication methods.
Install the package using pip: `pip install azure-graphrbac`. However, it's strongly recommended to migrate to the Microsoft Graph SDK for Python, as `azure-graphrbac` is deprecated.
To resolve this, use older credential types compatible with `azure-graphrbac` (e.g., `ServicePrincipalCredentials` or `UserPassCredentials`) or, preferably, migrate to the Microsoft Graph SDK for Python (`msgraph-sdk-python`) which natively supports `azure-identity` credentials.
Ensure that correct and up-to-date credentials are used for `azure-graphrbac`, potentially specifying the correct `resource` parameter (e.g., `https://graph.windows.net/`) if using `ServicePrincipalCredentials`. The recommended solution is to migrate to the Microsoft Graph API and its corresponding Python SDK.
Verify the existence of the Azure AD resource you are trying to access and ensure that the service principal or user has the correct, granular permissions assigned within Azure AD for the Azure AD Graph API. The recommended long-term solution is to migrate your application to use the Microsoft Graph API and its official SDK.