Get-AzureADContact
Gets a contact from Azure Active Directory.
Syntax
GetQuery (Default)
Get-AzureADContact
[-All <Boolean>]
[-Top <Int32>]
[-Filter <String>]
[<CommonParameters>]
GetById
Get-AzureADContact
-ObjectId <String>
[-All <Boolean>]
[<CommonParameters>]
Description
The Get-AzureADContact cmdlet gets a contact from Azure Active Directory.
Examples
Example 1 Retrieve all contact objects in the directory
PS C:\> Get-AzureADContact
ObjectId Mail DisplayName
-------- ---- -----------
b052db07-e7ec-4c0e-b481-a5ba550b9ee7 contact@contoso.com Contoso Contact
This command retrieves all contact objects in the directory.
Example 2 Retrieve one contact using the filter parameter
PS C:\> Get-AzureADContact -All $true -Filter "mail -eq 'contact@contoso.com'"
ObjectId Mail DisplayName
-------- ---- -----------
b052db07-e7ec-4c0e-b481-a5ba550b9ee7 contact@contoso.com Contoso Contact
Parameters
-All
If true, return all contacts. If false, return the number of objects specified by the Top parameter
Parameter properties
Type: | Boolean |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | True |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Filter
Specifies an oData v3.0 filter statement. This parameter controls which objects are returned.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
GetQuery
Position: | Named |
Mandatory: | False |
Value from pipeline: | True |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-ObjectId
Specifies the ID of a contact in Azure Active Directory.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
GetById
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Top
Specifies the maximum number of records to return.
Parameter properties
Type: | Int32 |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
GetQuery
Position: | Named |
Mandatory: | False |
Value from pipeline: | True |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Notes
See the migration guide for Get-AzureADContact to the Microsoft Graph PowerShell.