Your company has an Azure subscription configured with an Azure Active Directory (Azure AD) tenant. This tenant is used for managing user information. Your company has also a line-of-business (LOB) application that uses the Azure AD tenant for getting information from users.
You are asked to update the mobile attribute of all tenant users.
You need to perform this task using the least administrative effort.
What should you do?
You should use Set-AzureADUser cmdlet. This cmdlet allows you to modify the properties of a user in Azure AD. You can use this cmdlet in a script to perform a bulk modification on your tenant.
You should not use the Invoke-RestMethod cmdlet to call the Graph API. You use Invoke-RestMethod for making HTTP requests. You could use this cmdlet for calling the users' endpoint in the Graph API and then make a bulk modification, but this would require much more effort.
You should not use the Set-MsolUser cmdlet. This cmdlet is used for modifying Office 365 user properties. Although this cmdlet will modify the properties on the Azure AD tenant associated with the Office 365 subscription, your company does not have an Office 365 subscription, so you should not use this cmdlet.
You should not use the Set-ADUser cmdlet. You use this cmdlet for modifying the properties of an Active Directory Domain Services (AD DS) user. Since your Azure AD tenant is not connected with an AD DS domain, this cmdlet would not work for your environment.