az ad user list --upn should support starts_with functionality like --display-name does
See original GitHub issueI am not quite sure if its feature request or bug…
az ad user list --display-name "John Doe (Exter"
Will quckly find all users starting with "displayName"
:"John Doe (Exter"
-> It will find John Doe (External)
in this case, which is OK.
I suppose that:
az ad user list --upn "John.Doe@exa"
should do the same with "userPrincipalName"
attribute
-> It will not find anyting, unless You supply full --upn
name.
I understand that this is neccessary for az ad user show --upn-or-object-id
to output only single result.
Is possible to use something like this:
az ad user list --query "[?starts_with(userPrincipalName,'John.Do')]"
but it takes almost 1,5 min in our environment, instead of almost instant output with az ad user list --upn "John.Doe@exa"
Thanks
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
az ad user - Microsoft Learn
It is used to associate an on-premises Active Directory user account with their Azure AD user object. --mail-nickname. Mail alias. Defaults to user...
Read more >How to perform Azure AD bulk operations with PowerShell
This tutorial will explain how to perform bulk operations with two PowerShell modules: the AzureAD module and the Azure Az module. What is...
Read more >Get-AzureADUser -Filter Example - Easy365Manager
How to use the Get-AzureADUser cmdlet with filtering. PowerShell example code and some limitations and better options available.
Read more >Get AzureADUser - How to Find Azure AD Users ... - LazyAdmin
Just like with the on-premise Active Directory can we manage our users in Azure AD with PowerShell. For this, we will need to...
Read more >az ad user list -o table --filter "<options>(surname, 'brown')"
One of the workaround you can follow:- az ad user list -o table --filter "startsWith(surname, 'siewert')". The command you are trying to ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can use the
--filter
argument, e.g.For full reference of the filter synatx, check out https://docs.microsoft.com/en-us/graph/query-parameters#filter-parameter
@dshamanthreddy, your command looks good to me. Projecting
displayName
andmail
requires MultiSelect Hash expression.The command is working fine in my test:
Things you may check:
--query
and--output
?