web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

I need to update the UserInfo table

(1) ShareShare
ReportReport
Posted on by 5

We're attempting to create a Job in a workspace in order to update the enable field status of all rows in the UserInfo table, since everytime we backup the production environment to UAT all users are set to disabled. In essence we are trying to run:

while select forupdate UserInfo
where UserInfo.id != curUserId()
{
  UserInfo.enable = NoYes::Yes;
  UserInfo.update();
}

However it seems that like most default tables in D365, there is no way to grant privileges to do a query like that. Is there a woraround for the isssue?

We're also getting this error:

Cannot edit a record in User Information (UserInfo). The corresponding AOS validation failed.

 

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    239,118 Most Valuable Professional on at

    The only enabled user will be the administrator and privileges don't apply to him, right? So there is no reason to assign any.

    By the way, there is a more efficient way to do the same thing:

    update_recordset userInfo
        setting Enable = NoYes::Yes;

    Nevertheless the usual approach is doing it in SQL, not in X .

  • Jouluna Profile Picture
    5 on at

    Thanks.

    Right, the query won´t work even with the admin user.

    I thought of creating a SP in sql, however it will only work in the UAT environment.

    Is there a way to access the production DB?

    It seems there is no option to access the DB from lcs, and it might cause some issues. I tried in the past to add a column to a default table in UAT and once we transferred the changes to production, the solution stopped working.

  • Martin Dráb Profile Picture
    239,118 Most Valuable Professional on at

    You can't connect to the production DB and it wouldn't help you anyway, because the users are active in Prod. They're disabled during the export, to allow admin review users, run data clean-up scripts and so on.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 733

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 461 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 278 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans