Error : Get-CsOnlinePowerShellAccessToken : AADSTS50076: Due to a configuration change made by your administrator,


Below error popup when trying to connect Skype for Business online connector session.




Get-CsOnlinePowerShellAccessToken : AADSTS50076: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access '39624784-6cbe-4a60-afbe-9f46d10fdb27'.
Trace ID: e35e09ef-5e7b-4390-b25a-5b47d7c71e00
Correlation ID: a4791461-7d62-478b-985c-fdbee03dfabf
Timestamp: 2020-03-30 04:43:58Z
At C:\Program Files\Common Files\Skype for Business
Online\Modules\SkypeOnlineConnector\SkypeOnlineConnectorStartup.psm1:214 char:28
+             $accessToken = Get-CsOnlinePowerShellAccessToken @params
+                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-CsOnlinePowerShellAccessToken], AdalClaimChallengeException
    + FullyQualifiedErrorId : Microsoft.IdentityModel.Clients.ActiveDirectory.AdalClaimChallengeException,Microsoft.Rt
   c.Management.OnlineConnector.GetPowerShellAccessToken

You will get below error when you use Powe Shell script such as below to connect into Skype online connector.

Import-Module SkypeOnlineConnector


$userCredential = Get-Credential
$sfbSession = New-CsOnlineSession -Credential $userCredential -OverrideAdminDomain XYZ.onmicrosoft.com -Verbose
Import-PSSession $sfbSession




Error : Get-CsOnlinePowerShellAccessToken


Reason:


You are getting the above error because of Multi-Factor Authentication. When the MFA enabled for the account above command is not getting an option to authenticate with Multi-factor. It gives only username and password option to authenticate.

Resolution:


Option 1:

Remover MFA authentication option from the account.
I strongly not recommend removing MFA from the account. It is important to make login security strong.

Option 2:

Use below PS script to connect skype online sessions. Get-Credential option has been removed. This allows making MFA authentication for the online session.

Import-Module skypeOnlineConnector
$Session = New-CsOnlineSession -OverrideAdminDomain XYZ.onmicrosoft.com -Verbose
Import-PSSession $Session -AllowClobber -Verbose



Comments

Popular posts from this blog

5 Great Reasons To Connect Solar Power

Microsoft Mesh is the platform that Microsoft is creating for a virtual office in augmented reality

Crypto Wallet