I am working on an application that heavily uses the AD component, and I am using AD_UserLoadToUsers to add some AD users to the outsystems users table it was working fine on Dev, but once I deployed the code now to QA I am getting "Unspecified error" on this method with no further details.
Appreciate any help.
Hi Kawthar.
You'll need a token in all the environments where the AD component is installed; that's the way it's built. It uses the token to determine the connection details. The details are stored in the database if you use the demo, which is also a backoffice module for configurations.
Alternatively you can generate your token directly in code or you can use the library directly and just assign the connection details directly.
Thanks, @Renato Pauleta for your response. can you please let me know which method can help me generate the token directly in the code?
You can use the "ADAccessToken_Save" action from the ActiveDirectory_CS module. Just provide the Name, Domain, Container, DomainUsername and DomainPassword in the Source input parameter and a valid InvokerId (this is a user id, usually the user that's performing the operation).
The action will generate the token internally and you can use the Id output to query the ADAccessToken table to get the correct Token.
Dear @Renato Pauleta
it seems this behavior is because I have used the token that has been generated on the dev environment. I didn't generate it on QA, it seems the issue is solved now once it got generated in QA, although the same token has been generated. Appreciate it if there is an explanation for this behavior. and what about production? should I move the Demo app to production and generate the token there? or there is an alternative?