Disable First Time Login Password Reset Requirement

Harris, David 50 Reputation points
2025-03-04T22:26:49.8533333+00:00

I am setting up a demo environment where users will authenticate via Entra through our custom application. I set up new users within a group and assign a generic password for login. I want to keep this generic login for any users I create BUT the first time a new user attempts to login to the custom app, Entra is forcing a first-time user password reset process.

How can I eliminate this?

Microsoft Security Microsoft Entra Microsoft Entra ID
{count} votes

Accepted answer
  1. SrideviM 5,630 Reputation points Microsoft External Staff Moderator
    2025-03-10T04:50:10.5366667+00:00

    Hello Harris, David,

    I understand you want users in that group to use a generic password without being forced to reset it the first time they log in.

    Since Microsoft Entra ID automatically requires new users to change their password on first login, you’ll need to disable that setting manually.

    You can make use of Microsoft Graph PowerShell commands as there's no direct way to do this in Microsoft Entra Admin Center GUI.

    Initially, I created 2 new users with generic password and added them in group:

    enter image description here

    Now, run below Microsoft Graph PowerShell script to skip forced password reset for users present in that group by signing in with Admin account:

    
    #Install-Module Microsoft.Graph -Scope CurrentUser -Force
    
    Connect-MgGraph -Scopes "User-PasswordProfile.ReadWrite.All","GroupMember.Read.All"
    
    $GroupID = "groupId"
    
    $Users = Get-MgGroupMember -GroupId $GroupID | Select-Object -ExpandProperty Id
    
    foreach ($UserId in $Users) {
    
        $passwordProfile = @{
    
            ForceChangePasswordNextSignIn = $false
    
        }
    
        Update-MgUser -UserId $UserId -PasswordProfile $passwordProfile
    
    }
    

    enter image description here

    When I tried signing in with a user from that group, it worked with the assigned password without being prompted to reset it.

    Hope this helps!


    Please do not forget to click "Accept the answer” and Yes wherever the information provided helps you, this can be beneficial to other community members.

    User's image

    If you have any other questions or still running into more issues, let me know in the "comments" and I would be happy to help you.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.