Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Blog
  • Questions
  • Learning
    • E-learning Courses
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Tutorials
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • DataMiner Insights
      • Security
      • Integration Studio
      • System Architecture
      • DataMiner Releases & Updates
      • DataMiner Apps
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

“Losing” User Information after NT_RUN_ACTION

182 views11th March 2025NT_GET_USER NT_GET_USER_INFO NT_RUN_ACTION
4
Mariana Navarro [DevOps Advocate]90 11th March 2025 0 Comments

Hello Dojo!

I have a QAction that generates a string report using user information retrieved via protocol.UserCookie by calling the Notify types NT_GET_USER and NT_GET_USER_INFO. However, when this QAction is triggered by NT_RUN_ACTION, the retrieved user information becomes incorrect, and I end up with details from a different user. Logging the values during this process shows they are all empty, yet the final report contains incorrect user information. According to the documentation for protocol.UserCookie, when its value is null, the script runs using the user associated with the Communication object. Could you clarify how am I ending up with another user information in my report and also advise me how how I can reliably retrieve the correct data in this scenario?

Here's the logs as mentioned: (Expected user is Mariana Navarro. -- Red outline is triggered by NT_RUN_ACTION and Blue outline is triggered from button parameter)

This is what the code for the logs looks like:

João Severino [SLC] [DevOps Catalyst] Answered question 11th March 2025

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
1
João Severino [SLC] [DevOps Catalyst]12.94K Posted 11th March 2025 2 Comments

Hi Mariana,

Unfortunately, within DataMiner there are several uses of UserCookie and I believe the documentation you found is for the property of the DmsAutomationScriptRunOptions object that is used when calling an automation script from within a QAction via our NuGets, while the one you are using to do the NotifyDataMiner calls is documented here Property UserCookie | DataMiner Docs (sadly the documentation does not contain details).

This one is populated by DataMiner itself when it can determine who started a QAction like when a user pressed a button.

This functionality has a limitation where it needs user interaction and is not capable of determining the user when a QAction is called from the NT_RUN_ACTION.

Which causes the user cookie to be empty and the resulting username from the NT_GET_USER call will also be an empty string.

When you use an empty string to query the user details with the NT_GET_USER_INFO notify call you are calling this method to retrieve all users instead of just the one that matches a certain username.

This is why your userInfo[1] object will print the details of another user and if you iterate over all entries of the userInfo object you should see the users from the system.

The only suggestion I can think to assist you, in this case, is to attempt to rework the logic so that whichever part of the code calls the NT_RUN_ACTION is avoided and calls directly this bit of code and manually passes the user info into it.

João Severino [SLC] [DevOps Catalyst] Posted new comment 11th March 2025
Mariana Navarro [DevOps Advocate] commented 11th March 2025

Thank you João! That is very helpful information. Just a quick follow-up—based on your suggestion, I assume there's no way to retrieve the logged-in user instead of identifying the one who clicked the button/triggered the QAction?

João Severino [SLC] [DevOps Catalyst] commented 11th March 2025

It always needs to start with an interaction, being the pressing of a button or something else because all QAction code is executed in the same process in the server regardless of who is connected.
If you can determine the user by other means or on a previous step of your logic you could look into propagating that information but at its root, it needs to start from a user interaction.

You are viewing 1 out of 1 answers, click here to view all answers.
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas

Recent questions

Alarm Dashboard PDF/CSV Export 1 Answer | 0 Votes
Is the Microsoft SharePoint Connector Still Usable 0 Answers | 0 Votes
Is the Microsoft SharePoint Connector Still Usable 0 Answers | 0 Votes

Question Tags

adl2099 (115) alarm (62) Alarm Console (82) alarms (100) alarm template (83) Automation (223) automation scipt (111) Automation script (167) backup (71) Cassandra (180) Connector (108) Correlation (68) Cube (150) Dashboard (194) Dashboards (188) database (83) DataMiner Cube (57) DIS (81) DMS (71) DOM (139) driver (65) DVE (55) Elastic (83) Elasticsearch (115) elements (80) Failover (104) GQI (159) HTTP (76) IDP (74) LCA (151) low code app (166) low code apps (93) lowcodeapps (75) MySQL (53) protocol (203) QAction (83) security (88) services (51) SNMP (86) SRM (337) table (54) trending (87) upgrade (62) Visio (539) Visual Overview (345)
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin