Help with PowerFGT module

Hi All,
Recently I came across module GitHub - FortiPower/PowerFGT: PowerShell module to manage Fortinet (FortiGate) Firewall and I wanted to try it out but facing some connection issue. I am using public ip for connection but got below error


I have also tried with -skipCertificateCheck -httpOnly but getting below issue

but I can login from the browser, it looks like this
image
Thank You in advance

Hi, welcome back :wave:

I think you’re unlikely to find anyone here that can help; that’s a pretty specific problem you’re having. I recommend getting in touch with the module’s developers as they’ll be experts in both using the module, and FortiGate management.

2 Likes

CSRF cookies are designed to protect against replay attacks. My guess is the module isn’t smart enough (possible out of date) so it no longer works.

Hi All, Please accept my apologies for the delay in responding.
I solved this, in case anyone needs it.
I was not able to provide the port properly.
Here is the code that makes the connection.

$cr=Get-Credential
#works for account without token
Connect-FGT -Server 0.0.0.0 -port 00 -Credentials $cr -SkipCertificateCheck