az ad user update --id <user-id> --force-change-password-next-login true
az ad policy assignment create --policy <policy-id> --assignee <user-id>
az monitor activity-log alert create --name <alert-name> --scopes <resource-id> --condition "category = 'SignInLogs' and level = 'Error'" --action-groups <action-group-id>
azure-identity
library to authenticate with Azure Active Directory.azure-mgmt-graphrbac
library to interact with the Azure AD Graph API.UserOperations
class to reset the password for a specific user.azure-identity
library to authenticate with Azure Active Directory.azure-mgmt-graphrbac
library to interact with the Azure AD Graph API.UserOperations
class to enable MFA for a specific user.azure-identity
library to authenticate with Azure Active Directory.azure-mgmt-graphrbac
library to interact with the Azure AD Graph API.GroupOperations
class to add a user to a specific group.azure-identity
and azure-mgmt-graphrbac
) before running these scripts.