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

Community site session details

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

Get user password from ADFS AD

(0) ShareShare
ReportReport
Posted on by 5

I want to create a class that stores the password of the user who logs into our system, like an single sign on module.

We already use an active directory and also have adfs, but how can I create a kind of module from the system when starting AX the password is retrieved and also written to the database.

We need the password to synchronize the tasks with their email calendar. This is because a batch job is running that periodically creates tasks in the email calendar. Now I have to manually change the password for each user if it changes. It seems to me, that if the user logs in to AD (Terminal) that I can get his password somewhere. And write it to the database.

I can find no documentation but it seems to me not that I'm the only one with this question.

I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: Get user password from ADFS AD

    It's not possible and you should not do it.

    As suggested above, you can just allow the service user to create entries in the users' calendars. Or let the service user send calendar invites to the users. Or let each user (session) sync their own tasks - this way it's using the user's AD identity.

    Enterprise Portal is not related to "Enterprise Service Bus" (not sure what that even is).

  • Etienne88 Profile Picture
    5 on at
    RE: Get user password from ADFS AD

    Hi Martin,

    I know that is extremly dangerous, but but we change our system administrator and indicated that we had to switch to this construction, so I was curious if this was possible. I couldn't find any articles about anything, which is why I put it here.

    Also we have an function in AX that sync with the calanders in outlook. We are using the On-premise Exchange server

    .outlook.png

    We have an Enterprise portal but our company don't use this, I added the tag because it might be possible to communicate enterprise service bus?

  • Martin Dráb Profile Picture
    235,876 Most Valuable Professional on at
    RE: Get user password from ADFS AD

    Fortunately it's not possible, because it would be extremely dangerous. AD will never give you unencrypted passwords.

    Authentication is done by AD - it'll decide whether a user can log in or not and it won't reveal passwords to applications using it.

    If you give us more information about your situation, maybe we'll be able to design a solution that can be done.

    Which email server are you using? On-premise Exchange, for instance?

    Is the question related to Enterprise Portal? I see you attached the tag.

  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,093 on at
    RE: Get user password from ADFS AD

    Hi Etienne88,

    Storing passwords in DB (or in another place) is a huge security risk.

    Have you checked if you can grant access to user mailboxes to certain "system" account and use it to create tasks in the calendar?

    Something like mentioned in the article below

    docs.microsoft.com/.../add-mailboxfolderpermission

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: Get user password from ADFS AD

    Only AD gets the password upon sign in. Applications that rely on AD authentication don't have access to the user's password. Such access would be a huge security issue. 

    You should design your solution in a way that doesn't require using your users' passwords for them. For example, your code could run in the user's AX session when they open the client. 

    Or, you could send calendar invitations to the users on behalf of a service account. 

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 745 User Group Leader

#2
Martin Dráb Profile Picture

Martin Dráb 597 Most Valuable Professional

#3
André Arnaud de Calavon Profile Picture

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans