Login with az cli
az login or with just user and pass
az login -u user.one@domain.com -p Password123!
With service principal
az login --service-principal -u clientid -p 'clientsecret' --tenant test.azuretnenat.comPowershell:
Install-Module Microsoft.Graph
Install-Module Az
Import-Module Microsoft.Graph.Users
Import-Module Azlogin to azure
Connect-AzAccount
or with device code
Connect-AzAccount -AccountId "email@domain.com" -UseDeviceAuthenticationlogin to graph
Connect-MgGraph
Validate login:
azure :
az account showgraph
az ad signed-in-user show
Start graph session from azure resource manager session
Connect-MgGraphwhoami but for graph
Get-MgContext
logout
az logoutDisconnect-AzAccount