You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Get-MgDomainNameReference -DomainId $domain.id -All
Returns 300 results by default.
Using page size, you can return 999. However in environments with more recipients the command does not seem to paginate.
Work around, using Invoke-RestMethod if you query: https://graph.microsoft.com/v1.0/domains/<domain id>/domainNameReferences/microsoft.graph.group
or https://graph.microsoft.com/v1.0/domains/<domain.id>/domainNameReferences/microsoft.graph.user
You can retrieve all results, it is not clear how to do this using Get-MgDomainNameReference as trying to filter on type appears to be unsupported.
"The specified filter to the reference property query is currently not supported."
Get-MgDomainNameReference -Filter "@odata.type eq '#microsoft.graph.user'"
Invoke-MgGraphRequest < is the way to go. You still need to use a filtered URL, but It returns a @odata.nextLink that you can follow to loop through/paginate.
Describe the bug
Get-MgDomainNameReference -DomainId $domain.id -All
Returns 300 results by default.
Using page size, you can return 999. However in environments with more recipients the command does not seem to paginate.
Expected behavior
Using -all returns all references in a tenant.
How to reproduce
Get-MgDomainNameReference -DomainId $domain.id -All | measure-object
SDK Version
2.19.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Debug information is truncated.
Configuration
Name Value
PSVersion 5.1.19041.4648
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.4648
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Other information
No response
The text was updated successfully, but these errors were encountered: