Forum Discussion
majorbyte
8 years agoIdeator III
Yeah I forgot to mention that.
I takes the 90 days from the user that is logged in Aras (let's call him engineer,
3A4152FA2B8E4315AA183287C9AF1EE8).
That's why in my result from the query it says 90 for max_pwd_age.
The problem is that it should either get the maximum password age for vadmin and apply is to either pwd_is_set_on or created_on for vadmin OR it should get the maximum password age for engineer and apply is to either pwd_is_set_on or created_on for engineer
But currently it applies get's the 90 days from engineer and uses it on vadmin.
SELECT [pwd_is_set_on], (
SELECT MIN([maximum_pwd_age]) FROM innovator.[IDENTITY] WHERE [maximum_pwd_age]>0 AND [id] IN (
SELECT [ID] FROM [innovator].[GenerateTableOfIDs](
'''3A4152FA2B8E4315AA183287C9AF1EE8'',''A73B655731924CD0B027E4F4D5FCC0A9'',''87EDD3392BA843EF8610117AA8062804'',''BE4CA12BE9B745239607E23C2C3CD95A''')
/* Engineer ID*/ /* Engineer Group 1 */ /* Engineer Group 2 */ /* Engineer Group 3 */
)
) as [max_pwd_age_value],
DATEDIFF(d, ISNULL([pwd_is_set_on], [created_on]), GETUTCDATE()) [diff]
FROM innovator.[USER]WHERE [id]='EB2D5AA617FB41A28F081345B8B5FECB' /* vadmin id */