Skip to main content
AntonioM
Visitor III
October 1, 2023
Question

401 Error running Ansible playbook

  • October 1, 2023
  • 1 reply
  • 2189 views

Hi,

 

I'm running an Ansible playbook to create a large number of objects in Fortigate. I'm using API token authentication.

At some point I always get the error below:

 

{"http_status": 401, "raw": ".......Unauthorized....This server could not verify that you\nare authorized to access the document\nrequested.  Either you supplied the wrong\ncredentials (e.g., bad password), or your\nbrowser doesn't understand how to supply\nthe credentials required.

 

It seems like the session expires. How can I fix this?

Thanks.

1 reply

dbu
Staff
Staff
October 1, 2023

Hi @AntonioM ,

 

What profile does the user have ? Could you please try with super_admin user and share the outcome?


Regards!

AntonioM
AntonioMAuthor
Visitor III
October 1, 2023

Hi @dbu ,

 

I'm using a REST-API administrator with read-write permissions. Previously I also used a super-admin user and I got the same error.

 

Regards