Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

User not able to login until the save button is pressed on the user form ( SysUserManagement)

Posted on by 166

Hi Friends,

When a user is newly created i am getting an error saying "You are not authorised to login to D365" when the newly created user is logged in.

But the problem is once i enter the SysUserManagement form for the particular user(Image is attached) and click the save button without making any changes then the user is able to login to the D365 application.This looks like a strange scenario.Any inputs on this would be really helpful.

Thank you

G Badri Narayan

  • BADRI NARAYANAN G Profile Picture
    BADRI NARAYANAN G 166 on at
    RE: User not able to login until the save button is pressed on the user form ( SysUserManagement)

    Hi Girish,

    I checked all the parameters for user creation with the code we have written.It is the same.I compared with all the field values it remains the same with my code.

    Thank you

    G Badri

  • GirishS Profile Picture
    GirishS 27,832 Super User 2024 Season 1 on at
    RE: User not able to login until the save button is pressed on the user form ( SysUserManagement)

    I am not sure what may be the issue. But refer to the below thread and compare the code with the code you have written for creation of the user.

    https://community.dynamics.com/365/financeandoperations/f/dynamics-365-for-finance-and-operations-forum/280866/creating-a-user-via-x-job

    Thanks,

    Girish S.

  • BADRI NARAYANAN G Profile Picture
    BADRI NARAYANAN G 166 on at
    RE: User not able to login until the save button is pressed on the user form ( SysUserManagement)

    Hi Girsh,

    Thanks for your response.

    I checked the SID field before clicking the save button and during the creation of employee,it is generating a sid value.After the save button is clicked the value in SID field is changed but it is already generated even before i clicked the save button in the form.SID value is generated during creation of the employee.Please let me know if there is any other fix for this issue.

    Thank you

    G Badri Narayan

  • GirishS Profile Picture
    GirishS 27,832 Super User 2024 Season 1 on at
    RE: User not able to login until the save button is pressed on the user form ( SysUserManagement)

    I think SID value is missing in your code while creating employee. So after clicking on the Save button in the form SID value is generated and then the user able to login.

    Thanks,

    Girish S.

  • Suggested answer
    Mohit Rampal Profile Picture
    Mohit Rampal 12,547 Super User 2024 Season 1 on at
    RE: User not able to login until the save button is pressed on the user form ( SysUserManagement)

    Hi, You can compare UserInfo and related tables values by creating user manually and then by your code. Check is there is any mismatch. I'm guessing that Clicking save button might be calling standard methods which updates some field value after which user can log in. You need to find it and correct your code.

  • GirishS Profile Picture
    GirishS 27,832 Super User 2024 Season 1 on at
    RE: User not able to login until the save button is pressed on the user form ( SysUserManagement)

    Try the code given in the below blog in runnable class and check whether its creating user and able to login without clicking save button.

    https://selvadynamics.blogspot.com/2020/04/create-new-user-in-d365-fo-using-x.html?m=1

    Thanks,

    Girish S.

  • BADRI NARAYANAN G Profile Picture
    BADRI NARAYANAN G 166 on at
    RE: User not able to login until the save button is pressed on the user form ( SysUserManagement)

    Hi Girish,

    Yes i have seen that code where they are inserting few values into UserInfo Table.I also checked the values in this table before and after saving the form,the values are the same.Please let me know if there is any other way.

    Thank you

    G Badri

  • GirishS Profile Picture
    GirishS 27,832 Super User 2024 Season 1 on at
    RE: User not able to login until the save button is pressed on the user form ( SysUserManagement)

    No, there will be piece of code where the record will be inserted into the UserInfo table while creating the employee. I am asking you to revisit that code to find any clue.

    Thanks,

    Girish S.

  • BADRI NARAYANAN G Profile Picture
    BADRI NARAYANAN G 166 on at
    RE: User not able to login until the save button is pressed on the user form ( SysUserManagement)

    Hi Girish,

    Actually the place where email is set for the user is done during the creation of the employee.But the user is able to login once save button is clicked in SysUserManagementForm which is a standard form.So is there any other way to check for this issue?

    Thank you

    G Badri

  • GirishS Profile Picture
    GirishS 27,832 Super User 2024 Season 1 on at
    RE: User not able to login until the save button is pressed on the user form ( SysUserManagement)

    I think you need to revisit the logic for creating user when you create an employee with email Id.

    Thanks,

    Girish S.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans