4.1 Get-AzureDRAContact

Synopsis

Retrieves information about a contact from Azure Active Directory.

Syntax

Get-AzureDRAContact -Tenant <String> [-AzureContactAndFilter <Hashtable>] [-AzureContactOrFilter <Hashtable>] [-Identifier <String>] [-Attributes <String[]>] [-PowersForOperations <String[]>] [-VisiblePropertiesOnly     <SwitchParameter>] [-EnforceServerLimit <SwitchParameter>] [-ObjectsPerResponse <Int32>] [-ResumeString <String>] [-DRARestServer <String>] [-DRARestPort <Int32>] [-IgnoreCertificateErrors <SwitchParameter>] [-Force <SwitchParameter>] [-Timeout <Int32>] [<CommonParameters>]

Description

The Get-AzureDRAContact cmdlet retrieves properties of one or more contacts from Azure Active Directory. The requesting user must have the View All Azure Contact Properties power or a custom power with the necessary powers for the requested attributes. You can view the default list of attributes or specify specific attributes. The default attributes for an Azure contact include: DisplayName, FriendlyPath, ID, Path, and TenantIntID.

Parameters

Attribute / Description

Values

Required

Position

Default Value

Accept Pipeline input?

Accept wildcard characters?

AzureContactAndFilter [<Hashtable>]

The contact attributes to use for searching Azure contact objects. Azure contacts matching all of the listed attributes will be returned.

false

named

 

true (ByPropertyName)

false

AzureContactOrFilter [<Hashtable>]

The contact attributes to use for searching Azure contact objects. Azure contacts matching any of the listed attributes will be returned.

false

named

 

true (ByPropertyName)

false

Identifier [<String>]

The GUID or display name of the Azure contact.

false

named

 

true (ByPropertyName)

false

Tenant <String>

The Tenant ID of the object in GUID or display name format.

For example: b201dhg8-087e-5n9d-9986-c4d987bfa0b1 or MyTenant

true

named

 

true (ByPropertyName)

false

Attributes [<String[]>]

An array of attributes to retrieve specific values. If this parameter is missing, a default list of attributes is returned.

false

named

 

true (ByPropertyName)

false

PowersForOperations [<String[]>]

An array of DRA operation names for which you want the server to return read/write permission information. This parameter is typically used by a UI-based client to hide or disable elements the calling user doesn't have powers for. The PowersForOperations parameter is applicable only if you have specified the Identifier parameter.

false

named

 

true (ByPropertyName)

false

VisiblePropertiesOnly [<SwitchParameter>]

A flag to indicate whether DRA should return only properties the caller has powers to view. By default, DRA will return an error if the caller requests a property that they do not have powers to view. By specifying this flag DRA is instructed to not return an error and instead just not return a value for such attributes.

false

named

 

false

false

EnforceServerLimit [<SwitchParameter>]

A switch parameter indicates that the search results should be limited by the search result limit on the DRA Server. The typical server limit is 1000 items. The default is true.

false

named

 

false

false

ObjectsPerResponse [<Nullable`1>]

The number of objects to return in a response. The default is 250.

false

named

 

false

false

ResumeString [<String>]

This parameter indicates the last item returned from the server when multiple responses are needed to return all the search results to the client. The value of this parameter is set using the ResumeString property from the previous set of results. The ResumeString looks like: "CN=MYUser160,CN=Users,DC=MyDomain,DC=corp"

The EnforceServerLimit, ObjectsPerResponse, and ResumeString parameters are applicable only when the Identifier parameter is not specified.

false

named

 

false

false

DRARestServer [<String>]

The name of the computer running the DRA REST Service. The requested DRA operation will execute on this server. If the parameter is not specified, the value defaults to 'localhost'.

false

named

true (ByPropertyName)

false

DRARestPort [<Int32>]

The port where the DRA REST Service listens for requests. This parameter is used only when the DRARestServer parameter is also specified. If the parameter is not specified, the value defaults to 8755.

false

named

8755

true (ByPropertyName)

false

IgnoreCertificateErrors [<SwitchParameter>]

Allows the request to bypass any SSL certificate errors, such as the InvalidOperation error that occurs when the REST Service is bound to a self-signed certificate.

false

named

false

false

Force [<SwitchParameter>]

Suppresses any request for user input and supplies a 'yes' response. For example: -Force with a delete request will perform the delete without presenting the confirmation request to the user.

false

named

 

false

false

Timeout [<Int32>]

The wait time in seconds before the request to the DRA REST server times out. To specify an infinite timeout, you can set this parameter to -1.

false

named

100 seconds

true (ByPropertyName)

false

<CommonParameters>

Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see About CommonParameters.

 

 

 

 

 

NOTE:For more information, type "Get-Help Get-AzureDRAContact -detailed". For technical information, type "Get-Help Get-AzureDRAContact -full".

Example 4-1 1

PS C:\>Get-AzureDRAContact -Tenant b201dhg8-087e-5n9d-9986-c4d987bfa0b1 -Identifier 23225bb1-5ac0-4b4c-a23c-beb7fad44b65 -Attributes "Name","DisplayName","ID","FriendlyPath","FriendlyParentPath","FriendlyName"

This example requests the properties of the Azure contact identified by the GUID 23225bb1-5ac0-4b4c-a23c-beb7fad44b65 in the tenant b201dhg8-087e-5n9d-9986-c4d987bfa0b1. The Attributes parameter specifies what properties to return. When the Attributes parameter is not present, a default list of properties will be returned.

Example 4-2 2

PS C:\>Get-AzureDRAContact -Tenant b201dhg8-087e-5n9d-9986-c4d987bfa0b1 -AzureContactOrFilter @{Name="PF*"} -ObjectsPerResponse 50

In this example, DRA will search in the tenant b201dhg8-087e-5n9d-9986-c4d987bfa0b1 for Azure contacts having a name attribute beginning with "PF". The server should return a maximum of 50 items in the response. If there are more objects than the number specified in the ObjectsPerResponse parameter, the ResumeString parameter will be returned which can be used in a subsequent call to retrieve the next object set. The next line in this example shows how to use the ResumeString parameter in the subsequent call.

PS C:\>Get-AzureDRAContact -Tenant b201dhg8-087e-5n9d-9986-c4d987bfa0b1 -AzureContactOrFilter @{Name="PF*"} -ObjectsPerResponse 50 -ResumeString "CN=770DF55D-062B-4115-A8AF-A6A865A4BA00,AZ=b201dhg8-087e-5n9d-9986-c4d987bfa0b1"

Example 4-3 3

PS C:\>Get-AzureDRAContact -Tenant MyTenant -AzureContactOrFilter @{MultiMatch="SCH"}

In this example, a filtered search will be conducted using "SCH" with Multimatch. For more information, see “Multi-Field Searching” in the Directory and Resource Administrator User Guide.