title: Setting StrongAuthenticationUserDetails PhoneNumber for AzureAD via Powershell?
body: <p>That title really flows.</p>
  
  <p>When setting up computers for use with Azure Active Directory, we would have IT do initial setup and config. This included the first sign in and joining to Azure Active Directory. When signing in it forces you to select a verification method. We would use our desk phone or cell phone for ease.</p>
  
  <p>The time has come for us to update that second factor phone number. I know of a way to manually do it via the Azure AD Web UI, but I am looking for a scripted way to set that number in PowerShell.</p>
  
  <p>Here is how I retrieve the number via PowerShell.</p>
  
  <pre><code>Get-msoluser -UserPrincipalName "email@emailaddress.com" | Select-Object -ExpandProperty StrongAuthenticationUserDetails
  </code></pre>
  
  <p>That code returns this info:</p>
  
  <pre><code>ExtensionData                     : System.Runtime.Serialization.ExtensionDataObject
  AlternativePhoneNumber            :
  Email                             :
  OldPin                            :
  PhoneNumber                       : +1 5554445555
  Pin                               :
  </code></pre>
  
  <p>However, there seems to be no similar option for setting the StrongAuthenticationUserDetails.</p>
  
  <p>All my searches just turned up how to bulk enable 2-factor authentication, which is not what I want to do. I want to leave the StrongAuthentication the same while only updating the phone number.</p>