gerstand.blogg.se

Disable modern authentication
Disable modern authentication





disable modern authentication

$null = ( Remove-Module = ( $SkypeForBusinessSession. $paramRemoveModule = ( Get-Command -Name Set-CsOAuthConfiguration -ErrorAction $SCT | Select-Object -ExpandProperty Source) $null = ( Disconnect-AzureAD -Confirm: $false -ErrorAction $SCT) Write-Warning -Message 'Looks like Modern Auth is not enabled for this tenant! ' -WarningAction $STP $null = ( Set-CsOAuthConfiguration Shame on you! $paramSetCsOAuthConfiguration = 'Allowed ' If (( Get-CsOAuthConfiguration -ErrorAction $SCT | Select-Object -ExpandProperty ClientAdalAuthOverride) -ne 'Allowed ') $null = ( Revoke-AzureADUserAllRefreshToken = ( Revoke-AzureADUserAllRefreshToken Allow non Modern Auth in Skype for Business $paramRevokeAzureADUserAllRefreshToken = ( Get-AzureADUser -SearchString $Identity | Select-Object -ExpandProperty objectId) # Disconnect Modern Authentication (For a single user) - In this case the MTR If (( Get-OrganizationConfig | Select-Object -ExpandProperty OAuth2ClientProfileEnabled) -eq $true) $null = ( Connect-ExchangeOnlineShell ConnectExchangeOnline $paramConnectExchangeOnlineShell = $false

disable modern authentication

If ( -not ( Get-Command -Name Get-Mailbox -ErrorAction $SCT)) # We use the ExchangeOnlineShell Module from the Gallery $null = ( Import-PSSession ConnectSkypeForBusinessOnline $SkypeForBusinessSession = ( New-CsOnlineSession -UserName ( Read-Host -Prompt 'Please enter the admin principal name (ex. # We use a crappy workaround, because the Modern Auth window never shows up to querry the admin UPN, and I do NOT trust the command to querry it [ Parameter( Mandatory, HelpMessage = 'The Microsoft Teams Rooms (MTR) Account Search String ' , You need to be a tenant admin to configure all the things Just a quick and dirty tool to do the job, nothing fancy and without a real error handling! \Invoke-mtrDisableModernAuthentication.ps1 -Identity NOTES \Invoke-mtrDisableModernAuthentication.ps1 -Identity 'MyTeamRoom' Function Invoke-mtrDisableModernAuthentication







Disable modern authentication