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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

adding SystemUser via API returns "The record already exists"

(0) ShareShare
ReportReport
Posted on by 10

I am trying to create a new SystemUser in our D365 system.  I can do so through the standard UI, but when trying to do so through the API I receive this message:

"Write failed for table row of type 'SystemUserEntity'. Infolog: Info: Cannot create a record in User information (SysUserInfo). User ID: mytest.\nThe record already exists.."
The user is definitely not existing.
I am sending a simple POST to xyzco.operations.dynamics.com/.../SystemUsers with a JSON body like this:
I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,187 Super User 2025 Season 2 on at

    Hi Matthew,

    Have you checked if both the tables SysUserInfo and UserInfo (system table) don't have a record for this user ID?

  • Matthew Baute Profile Picture
    10 on at

    Hi André:

    I do not have access to SQL, only OData / API. 

    Nonetheless, I receive the error if I enter any brand new email address that I make up on the spot.  Which doesn't make any sense.  How could the record already exist if I just entered it for the first time?

    thanks,
    Matthew

  • André Arnaud de Calavon Profile Picture
    301,187 Super User 2025 Season 2 on at

    Hi Matthew,

    Did you also provide a not used user ID when you enter new email addresses?

  • Suggested answer
    Matthew Baute Profile Picture
    10 on at

    Finally figured it out.  Here is the body for the SystemUser POST:

    { 
        "UserID": "jsmith",
        "UserName": "John Smith",
        "NetworkDomain": "https://sts.windows.net/",
        "Email": "jsmith@mycorp.com",
        "Alias": "jsmith@mycorp.com", --> this is the related "Person" and must exist in AD
        "Company": "MYCORP",
        "Enabled": true,
        "UserInfo_language": "en-us",
        "Helplanguage": "en-us",
        "AccountType": "ClaimsUser"
    }

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 467 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 420 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 241 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans