Monday, October 26, 2020

Microsoft 365 MFA - I have lost my mobile which has Microsoft Authenticator apps installed now how to login and register to another mobile .

 1) Update your Office 365 Admin to revoke MFA Session and Require Re-Register MFA.

Go to Azure AD > User (select user) > Authentication methods > Click on Require re-register MFA  and Revoke MFA Session.




2) Go to the URL :  https://aka.ms/proofup and setup your new device.
3) Once Device is get setup you can able to see your old device , Remove this .








Thursday, October 8, 2020

Create custom attribute and update value for guest account users

// Update custom attribute of the user.

Connect-AzureAD 

Get-AzureADUser -ObjectId 79a36543-1e05-4407-9e74-df6bea9135d4 | Select -ExpandProperty ExtensionProperty

Set-AzureADUserExtension -ObjectId 79a36543-1e05-4407-9e74-df6bea9135d4 -ExtensionName "extension_2c8a597a3ee24c138b03a0a67c5180b7_aribaemployeeID" -ExtensionValue "0000809999"
Code with variable
Connect-AzureAD # Enter your Azrue Admin/pwd 

$UserObjectID  = "32b290fb-ea39-4f9b-b4a1-268fb2" # Copy the object id of the user from Azure AD 
$UserAribaID = "0000900022" # Enter user's employee id adding 0 as prefix to make this 10 chararcter example Employee ID = 901022 , Ariba ID = 0000900022
Get-AzureADUser -ObjectId $UserObjectID | Select -ExpandProperty ExtensionProperty # Check extension property before update Set-AzureADUserExtension -ObjectId $UserObjectID -ExtensionName "extension_2c8a597a3ee24c138b03a0a67c5180b7_aribaemployeeID" -ExtensionValue $UserAribaID Get-AzureADUser -ObjectId $UserObjectID | Select -ExpandProperty ExtensionProperty # Check extension property after update .

Sunday, October 4, 2020

SBC - Direct routing assign dial plan

Import-Module SkypeOnlineConnector
$userCredential = Get-Credential
$sfbSession = New-CsOnlineSession -Credential $userCredential
Import-PSSession $sfbSession

Get-CsOnlineUser -Identity "lava@hrmasd.com" | fl RegistrarPool,OnPremLineUriManuallySet,OnPremLineUri,LineUri

Set-CsUser -Identity "lava@hrmasd.com" -EnterpriseVoiceEnabled $true -HostedVoiceMail $true -OnPremLineURI tel:+34000125098

Wednesday, July 8, 2020

Get all Azure AD users details to CSV file

$O365Account = 'admin.sanjiv.kumar@abcdef.onmicrosoft.com'
$O365pw = ConvertTo-SecureString 'tytyt' -AsPlainText -Force
$O365Credentials = New-Object –TypeName System.Management.Automation.PSCredential –ArgumentList $O365Account, $O365pw

Connect-AzureAD -Credential $O365Credentials

$Alluser = Get-AzureADUser -All:$True | Select DisplayName,UserPrincipalName, PasswordPolicies, AccountEnabled 
$Alluser | Export-Csv C:\Temp\user.csv

Friday, June 12, 2020

Add Guest account users to exchange Global Address list

https://docs.microsoft.com/en-gb/microsoft-365/admin/create-groups/manage-guest-access-in-groups?view=o365-worldwide#add-guests-to-the-global-address-list

Create Exchange online address list

https://docs.microsoft.com/en-us/exchange/email-addresses-and-address-books/address-lists/address-lists?view=exchserver-2019#:~:text=By%20default%2C%20a%20new%20installation,recipients%20in%20the%20Exchange%20organization.

--------------------------------Filter properties------------------------------------------
https://docs.microsoft.com/en-gb/powershell/exchange/recipientfilter-properties?view=exchange-ps

-------------Steps------------------
https://tech.xenit.se/how-to-create-a-custom-address-lists-in-exchange-online/

Get-AddressList
New-AddressList -Name 'Test Address List' -RecipientFilter {((Company -eq 'XYZ'))}

----------Bulk Contact user creation ---------------------
https://docs.microsoft.com/en-us/microsoft-365/compliance/bulk-import-external-contacts?view=o365-worldwide#hide-external-contacts-from-the-shared-address-book

Check specific service plan (Exchange, OneDrive or Yammer) enabled or disabled in office 365 license users with assigned Date


$O365Account = 'admin.sanjiv.kumar@abcabc.onmicrosoft.com'
$O365pw = ConvertTo-SecureString 'Password' -AsPlainText -Force
$O365Credentials = New-Object –TypeName System.Management.Automation.PSCredential –ArgumentList $O365Account, $O365pw

Connect-AzureAD -Credential $O365Credentials
Connect-MsolService -Credential $O365Credentials
#Log File
$users = Import-Csv 'C:\Temp\Excel data\Data.csv'
Start-Transcript -Path C:\Temp\SOF_Yammer_LicensesReportTranscript_$(get-date -f ddMMyyyy-HHmm).txt -Append
$Datetime= Get-Date -Format dd_MM_yyyy_HH.mm.ss
$LogFileName=([string]::Concat("C:\Temp\SOT_Yammer_Report-" , $Datetime ,".csv"))
New-Item  $LogFileName  -ItemType file

Add-Content $LogFileName -Value ([string]::Concat("User email" +","+ "License Assigned date"))


#$users = Get-MsolUser -all #| Where isLicensed -EQ $true


#Foreach ($employee in $employee_list) 
Foreach ($user in $users)

{
    
    
    $intFlag = 0

    $UserEmailAddress = $user.Email

    $assignedplans = (Get-AzureADuser -ObjectId $UserEmailAddress).assignedplans

    foreach ($assignedplan in $assignedplans)

    {

       # To check the service plan ID look at MS website https://docs.microsoft.com/en-us/azure/active-directory/users-groups-roles/licensing-service-plan-reference#next-steps
         #If (($assignedplan.ServicePlanId -eq "efb87545-963c-4e0d-99df-69c6916d9eb0"))# for Excahnge
         If (($assignedplan.ServicePlanId -eq "7547a3fe-08ee-4ccb-b430-5077c5041653")) #for Yammer
         #If (($assignedplan.ServicePlanId -eq "5dbe027f-2339-4123-9542-606e4d348a72")) #for OneDrive
        
        
        
        {
            If (($assignedplan.CapabilityStatus -eq "Enabled"))

             {
        
                    Write-Host   $UserEmailAddress -ForegroundColor White
                    Add-Content $LogFileName -Value ([string]::Concat($UserEmailAddress) +","+ $($assignedplan.AssignedTimestamp))
           
            }
        }

    }

    

}


Write-Host -ForegroundColor Cyan "`n***** Script completed, please close this window *****"
Stop-Transcript

HTML

Script:

JS