Permissions errors getting collections

Feature(s) impacted

Im moving an existing backend from express/sequelize to nest.js. Using the same credentials ( FOREST_API_KEY and others ), Im getting this error message when tries to get a collection:

Error: Roles V2 are unsupported
     at Function.getPermissions (/usr/src/app/node_modules/@forestadmin/agent/src/agent/utils/forest-http-api.ts:142:15)
     at processTicksAndRejections (internal/process/task_queues.js:93:5)

Expected behavior

Let get all collections information

Failure Logs

 2022-08-30T16:21:49.041Z - [INFO] [forestadmin] [200] POST /authentication - 0ms
 2022-08-30T16:21:51.260Z - [INFO] [forestadmin] [200] GET /authentication/callback - 1931ms
 2022-08-30T16:21:51.279Z - [ERROR] [forestadmin] [500] GET /company - 0ms

 ===== An exception was raised =====
 GET /company?{
  timezone: America/Buenos_Aires,
  fields[company]: id,logo,background,website,facebook,instagram,twitter,linkedin,youtube,isHidden,createdAt,updatedAt,legalEntity,useTradeNameAsPrimary,hideEmail,hidePhone,
  page[number]: 1,
  page[size]: 15,
  sort: -id

  Roles V2 are unsupported

 Error: Roles V2 are unsupported
     at Function.getPermissions (/usr/src/app/node_modules/@forestadmin/agent/src/agent/utils/forest-http-api.ts:142:15)
     at processTicksAndRejections (internal/process/task_queues.js:93:5)


  • Project name: dunsguide
  • Environment name: Development
  • Agent type & version:

    "@forestadmin/agent": "^1.0.0-beta.43",
    "@forestadmin/datasource-sql": "^1.0.0-beta.40",

Hi @Maximiliano_Carrizo

Actually that’s a bug… the message should say something like “Roles V1 are unsupported, please migrate to Roles V2”.
I’m opening a bug report on our side to update the message.

About the reason why you are getting this error with an older project, but not on a more recent one is because the role system have evolved in Forest Admin, but we kept retro-compatibility.

We released the NestJS agent only a couple months ago (actually still in beta, but not for long), and did not implement support for the older role system in it.

To upgrade, you can follow this tutorial:

The documentation is slightly outdated: if I remember correctly it is no longer needed to contact the support and ask for the project to be “ready to migrate”.

1 Like

Before migrating, I just checked and roles are a paying feature (see Pricing).

If you are using the free plan, tell us so we can check that your migration goes smoothly

Good afternoon ! We are not using a free plan, but … before migrating anything I need to talk with my boss, because … application is actually working with express and sequelize …

If I update the application and something goes wrong, I will not have the app working with nest.js and I will not have the app working with express too, so I will be in trouble.

Met me ask to my boss what to do. Thanks for the INCREDIBLE support !

Is there is a way to migrate ONLY development environment to make all the test that I need it would be lovely.

Sadly there is no way to migrate only one environment, this is a global project thing.

Let’s decide on a course of action tomorrow.

In the meantime, you can test your new agent by creating a free project on another account (in development all paying features are available), that should give you another envSecret/authSecret tuple that does support the new role system

I already did, using a personal account just for testing, and it worked like a charm. Unfortunatelly, I need to mantain the existing corporate site.
I will discuss this topic with my boss tomorrow morning, and I will let you know what I will do. Thanks for all, your support is awesome

Hi, Romaing, good morning !

Very simple question: If we decide to migrate our actual site, and there is a problem later … it is possible to rollback that change and restore the old version ?

Thanks !

Hi @Maximiliano_Carrizo,

It will be possible to rollback if anything happen.
Keep us updated for the decision and our customer success team will be there to help for the migration.



Those are GREAT news ! Let me talk this topic !

One more question. It is possible to make the migration on Sunday ? Because we have no users, and I can fix everything with no pressure.

We decided to make the migration. What we are talking now is when. Sunday would be a great win.

Hi, @shohanr ! Hoping you are having a nice evening, my question: It is possible to run the migration on Sunday ?

Thanks !

@romaing hi !

Im not getting responses from you, guys. It is possible to make the migration on Sunday ?


Sure @Maximiliano_Carrizo.
Our team enable your roles to migrate and then you will decide through the interface whenever it please you (i.e. on Sunday).

Lovely ! Please, enable it.

Project path is

Thanks ! Let me know when its enabled !

The roles have been activated.
You can now proceed with the migration whenever you want from the Roles tab of the project settings.
The process is fully transparent for the users and no interruptions will be caused even if you perform the actions during work day.
The process will only take a few minutes.

(Corrected: Please forget the first message about the pending invitation, it is irrelevant)

Have a good day @Maximiliano_Carrizo

Best regards,


Thank you. Talk again to you on Monday !


Hello @Maximiliano_Carrizo,

Any news about the roles migration?
How did it go?


Oh, it worked perfectly !

THANK you very much, man ! Im very happy !

1 Like

@Maximiliano_Carrizo that’s a great news!

Thanks for your answer :slight_smile: