Thank you for posting this in Microsoft Q&A.
I understand you are looking for a way to manage Azure devices and find their location per office. Unfortunately, there no device location or physical location attribute in an AAD device properties. This location features available in Intune not in Azure.
One possible way is to via sign in logs. Sign-in logs will be available 30 days. Use below PowerShell to get sign-in logs.
$SetDate = (Get-Date).AddDays(-30); $SetDate = Get-Date($SetDate) -format yyyy-MM-dd
$array = Get-AzureADAuditSignInLogs -Filter "createdDateTime gt $SetDate"
$data =@()
foreach($item in $array)
{
$row = "" | Select-Object User,UPN,City,State,Region
$row.user = $item.UserDisplayName
$row.upn = $item.UserPrincipalName
$row.city = $item.Location.City
$row.state = $item.Location.State
$row.region = $item.Location.CountryOrRegion
$data += $row
}
$data | Format-Table -AutoSize
Use below code to separate them every office.
Get-AzureADAuditSignInLogs -Filter "location/city eq 'Redmond' and location/state eq 'Washington' and location/countryOrRegion eq 'US'"
Hope this helps. Do let us know if you any further queries.
Thanks,
Navya.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.