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-MGDomain throwing error after authencation #110

Open
RSOCKS opened this issue Aug 31, 2023 · 8 comments
Open

Get-MGDomain throwing error after authencation #110

RSOCKS opened this issue Aug 31, 2023 · 8 comments
Labels
type/bug Non-urgent code defect

Comments

@RSOCKS
Copy link

RSOCKS commented Aug 31, 2023

Describe the bug
A clear and concise description of what the bug is.

When running 'Start-HawkTenantInvestigation', after connection the Get-MGDomain cmdlet errors

image

This occurs after all authentication to the tenant with a Global Admin account and right after I specify the output direcotry

@RSOCKS RSOCKS added the type/bug Non-urgent code defect label Aug 31, 2023
@jonesconsulting
Copy link

I get the same error and and unable to run the report!

Disclaimer
Do you agree with the above disclaimer?
[Y] Yes [N] No [?] Help (default is "Y"): y

Please provide an output directory: C:\Hawk\New
Get-MGDomain : One or more errors occurred.
At line:81 char:9

  •     [string]$TenantName = (Get-MGDomain | Where-Object {$_.isDefa ...
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Get-MgDomain_List], AggregateException
    • FullyQualifiedErrorId : System.AggregateException,Microsoft.Graph.PowerShell.Cmdlets.GetMgDomain_List

PS C:\Windows\system32>

@RSOCKS
Copy link
Author

RSOCKS commented Sep 20, 2023 via email

@jonesconsulting
Copy link

jonesconsulting commented Sep 20, 2023 via email

@jonesconsulting
Copy link

I noticed I'm also receiving the error below after entering start-hawktenantinvestigation, not sure if this indicates another issue? the previously noted error appears to be resolved

PS C:\Windows\system32> start-hawktenantinvestigation
Initializing Application Insights
Checking for latest version online
Found Version 3.1.0 Online
Latest Version Installed
Skipping Upgrade
Testing Graph Connection
Connecting to MGGraph using MGGraph Module
Welcome to Microsoft Graph!

Connected via delegated access using 14d82eec-204b-4c2f-b7e8-296a70dab67e
Readme: https://aka.ms/graph/sdk/powershell
SDK Docs: https://aka.ms/graph/sdk/powershell/docs
API Docs: https://aka.ms/graph/docs

NOTE: You can use the -NoWelcome parameter to suppress this message.

WARNING: Unable to find type [Microsoft.Graph.PowerShell.Authentication.Utilities.DependencyAssemblyResolver].
Select-MgProfile : The term 'Select-MgProfile' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:31 char:9

  •     Select-MgProfile -Name "v1.0"
    
  •     ~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (Select-MgProfile:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException

Setting Up initial Hawk environment variable

@jonesconsulting
Copy link

jonesconsulting commented Oct 3, 2023 via email

@T0pCyber
Copy link
Owner

T0pCyber commented Oct 3, 2023

@jonesconsulting - Are you able to run "Connect-MGGraph" before running Hawk? Connect to the Graph before you run it and run "Get-MGGraph". It should return your domain list. If it doesn't return your domain or gives and error, then it might be a permission issue connecting to the graph.

Readme: https://aka.ms/graph/sdk/powershell
SDK Docs: https://aka.ms/graph/sdk/powershell/docs
API Docs: https://aka.ms/graph/docs

@jonesconsulting
Copy link

jonesconsulting commented Oct 3, 2023 via email

@Gray-0men
Copy link

Uninstall-Module -Name MSOnline -RequiredVersion 1.1.183.80
Install-Module -Name MSOnline -RequiredVersion 1.1.183.66

Try after doing that. Should work now, this is how I fixed it. Found issue in another thread
microsoftgraph/msgraph-sdk-powershell#2227

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Non-urgent code defect
Projects
None yet
Development

No branches or pull requests

4 participants