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

Forge-UserAgent : The term 'Forge-UserAgent' is not recognized as the name of a cmdlet, function, script file, or operable program. #14

Open
mezzofix opened this issue Mar 17, 2024 · 2 comments

Comments

@mezzofix
Copy link

When executing Invoke-DumpOWAMailboxViaMSGraphApi getting:

Forge-UserAgent : The term 'Forge-UserAgent' 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 C:\Users\me\OneDrive\Pulpit\device_code\TokenTactics\modules\OutlookEmailAbuse.ps1:108 char:30
+                 $UserAgent = Forge-UserAgent -Device $Device
+                              ~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Forge-UserAgent:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Invoke-RestMethod : Object reference not set to an instance of an object.
At C:\Users\me\OneDrive\Pulpit\device_code\TokenTactics\modules\OutlookEmailAbuse.ps1:133 char:21
+ ... $response = Invoke-RestMethod -Uri $url -ContentType "application/jso ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Invoke-RestMethod], NullReferenceException
    + FullyQualifiedErrorId : System.NullReferenceException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
@weldingwit
Copy link

Same issue here any update on why it is not working pls?

Thanks

@weldingwit
Copy link

weldingwit commented Jun 21, 2024

@mezzofix You can fix this issue by changing the Forge-UserAgent to the new Invoke-ForgeUserAgent in modules/OutlookEmailAbuse.ps1 see here https://github.com/rvrsh3ll/TokenTactics/pull/11/files

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

No branches or pull requests

2 participants