Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-EntraDomain doesn't work, but Connect-MgGraph does #1253

Closed
satyajit321 opened this issue Dec 19, 2024 · 1 comment
Closed

Get-EntraDomain doesn't work, but Connect-MgGraph does #1253

satyajit321 opened this issue Dec 19, 2024 · 1 comment
Labels

Comments

@satyajit321
Copy link

Thanks for reporting the bug. Please ensure you've gone through the following checklist before opening an issue:

  • Make sure you can reproduce this issue using the latest released version of Microsoft.Graph.Entra or Microsoft.Graph.Entra.Beta.
  • Please search the existing issues to see if there has been a similar issue filed.

Describe the bug

Get-EntraDomain fails with error, where as Get-MsolDomain or Get-MgDomain works just fine using the same admin account session. It appears the Entra cmdlet isn't wrapped properly and isn't passing the details to underlying MgGraph cmdlet.

To Reproduce
Steps to reproduce the behavior:

  1. Execute Get-EntraDomain
  2. See error as below
  3. PS> Get-EntraDomain
    Get-MgDomain : A parameter cannot be found that matches parameter name 'Headers'.
    At C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Entra\0.19.0\Microsoft.Graph.Entra.psm1:1334 char:42
  •     $response = Get-MgDomain @params -Headers $customHeaders
    
  •                                      ~~~~~~~~
    
    • CategoryInfo : InvalidArgument: (:) [Get-MgDomain], ParameterBindingException
    • FullyQualifiedErrorId : NamedParameterNotFound,Get-MgDomain
  1. Get-MgDomain -Headers although if manually checked I can find this is present

Expected behavior

Expect it to give same output as Get-MgDomain with a list of domains onboarded in the tenant
Get-MgDomain

Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsV
eri
fie
d


dr.quan.contoso.com Managed True False False False Tru
mail-in.contoso.com Managed True False False False Tru

Debug Output

Run the problematic command with -Debug and paste the resulting debug stream below.
⚠ ATTENTION: Be sure to remove any sensitive information that may be in the logs.

PS > Get-EntraDomain -Debug
DEBUG: ============================ TRANSFORMATIONS ============================

Confirm
Continue with this operation?
[Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"):
DEBUG: Debug : True

Confirm
Continue with this operation?
[Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"):
DEBUG: =========================================================================

Confirm
Continue with this operation?
[Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"):
Get-MgDomain : A parameter cannot be found that matches parameter name 'Headers'.
At C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Entra\0.19.0\Microsoft.Graph.Entra.psm1:1334 char:42

  •     $response = Get-MgDomain @params -Headers $customHeaders
    
  •                                      ~~~~~~~~
    
    • CategoryInfo : InvalidArgument: (:) [Get-MgDomain], ParameterBindingException
    • FullyQualifiedErrorId : NamedParameterNotFound,Get-MgDomain

Module Version

Please run Get-Module Microsoft.Graph.Entra* after cmdlet execution and paste the output below.
If a module cannot be installed or imported, please run Get-Module -ListAvailable and paste the output.
Get-Module Microsoft.Graph.Entra*

ModuleType Version Name ExportedCommands


Script 0.19.0 Microsoft.Graph.Entra {Add-EntraAdministrativeUnitMember, Add-EntraApplicationOw...

Environment Data

Please run $PSVersionTable and paste the output below. If running the Docker container image, indicate the tag of the image used and the version of Docker engine.

$PSVersionTable

Name Value


PSVersion 5.1.22621.4391
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.22621.4391
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Screenshots

If applicable, add screenshots to help explain your problem.
N/A

Additional context

Add any other context about the problem here.
Do we have any email support for this module, I find it easier to email rather than submitting\tracking here. PS7 not tested, don't intend to use it.

@satyajit321
Copy link
Author

satyajit321 commented Dec 20, 2024

It started working today without any change to the module. Only difference being I updated the EXO module from 3.5.1 to 3.7.0 due to the other DLL conflict reported here. Restarted the PS window.

`Get-EntraDomain

Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified


dr.quan.contoso.com Managed True False False False True`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant