I have added slack to Azure Active Directory Enterprise application and running SSO. I want to assign users and groups to the app in azure. So, basically, it is really easy to use portal. Also , I provided the PowerShell script as well.
#AzureAD Module
#Azure login : Connect-AzureAD
$app_name ="slack"
$app_role_name = "user"
$user = Get-AzureADUser -ObjectId "$username"
$sp = Get-AzureADServicePrincipal -Filter "displayName eq '$app_name'"
$appRole = $sp.AppRoles | Where-Object { $_.DisplayName -eq $app_role_name }
New-AzureADUserAppRoleAssignment -ObjectId $user.ObjectId -PrincipalId $user.ObjectId -ResourceId $sp.ObjectId -Id $appRole.Id
now, I have to do same task with python, I found the Azure Python SDK, but I am not sure which library I should use? any body has any experience to support me?