Retrieves directory objects by their IDs from Microsoft Graph.
The Get-CIPPDirectoryObjects function retrieves directory objects (users, groups, devices, etc.) by their IDs from Microsoft Graph. This is useful for batch lookups of multiple objects at once. You can optionally specify which properties to return.
![]()
![]()
Specifies the ID of the customer tenant. This parameter is mandatory.
![]()
![]()
Specifies an array of directory object IDs to retrieve. This parameter is mandatory.
![]()
![]()
Specifies the properties to return for each directory object. This parameter is optional. If not provided, all properties will be returned.
![]()
![]()
Specifies whether to use application permissions instead of delegated permissions. This parameter is optional.
![]()
![]()
Specifies whether to perform a lookup in the partner tenant. This parameter is optional.
PS > Get-CIPPDirectoryObjects -CustomerTenantID "contoso.onmicrosoft.com" -Ids @("12345678-1234-1234-1234-123456789012", "87654321-4321-4321-4321-210987654321")PS > Get-CIPPDirectoryObjects -CustomerTenantID "contoso.onmicrosoft.com" -Ids @("12345678-1234-1234-1234-123456789012") -Select "displayName,userPrincipalName"