FortiPower / PowerFMG

PowerShell module to manage Fortinet (FortiManager) Manager
Apache License 2.0
2 stars 3 forks source link

Not working anymore #10

Open FranVoz opened 8 months ago

FranVoz commented 8 months ago

Hello, is this still supposed to work ?

it seems you need to lock the adom where you want to make changes now or else you get and error saying

"Unable to use FortiManager API (-11) No permission for the resource"

thanks.

alagoutte commented 8 months ago

What fortimanager release ?

FranVoz commented 8 months ago

FortiManager-VM64 v7.0.11 GA build0595

alagoutte commented 8 months ago

Do you have following the connexion procedure ? And add api json access to your user ?

https://github.com/FortiPower/PowerFMG?tab=readme-ov-file#connecting-to-the-fortimanager

FranVoz commented 8 months ago

Yes I sure did, Connection is OK and getting info is OK too but making changes is not, as I said it seems you need to lock the adom before doing any changes (as you have to do too if you do manual changes using the GUI)

alagoutte commented 8 months ago

Yes I sure did, Connection is OK and getting info is OK too but making changes is not, as I said it seems you need to lock the adom before doing any changes (as you have to do too if you do manual changes using the GUI)

the module have limited supported feature, you need to found the API call for enable this feature

FranVoz commented 8 months ago

so this module commands like Remove-FMGFirewallAddress are not working on current FGM releases.

alagoutte commented 8 months ago

so this module commands like Remove-FMGFirewallAddress are not working on current FGM releases.

You have an error message ?

FranVoz commented 8 months ago
Unable to use FortiManager API (-11) No permission for the resource
Au caractère C:\Program Files\WindowsPowerShell\Modules\PowerFMG\0.1.0\Private\RestMethod.ps1:184 : 13
+             throw "Unable to use FortiManager API (" + $response.resu ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Unable to use F...or the resource:String) [], RuntimeException
    + FullyQualifiedErrorId : Unable to use FortiManager API (-11) No permission for the resource
FranVoz commented 8 months ago

I think It is related to a certain adom mode that could be configured as "workflow" or "workspace" mode I'll do some tests and come back if I find some info.