0 votes

I have followed the instructions but still cannot seem to connect to Azure AD. If I install the latest Azure AD powershell module I can connect via powershell. As soon as I uninstall and install the version described in the HOW-TO I get that it threw an exception. Please advise.

by (480 points)
0

We are an education location. The main difference I see is when signing in. With the newer version the dialog box that pops for sign in is a web form. When using the module described in the HOW-TO it is the simple username and password dialog box.

0

Hello,

As soon as I uninstall and install the version described in the HOW-TO I get that it threw an exception.

Could you post here a screenshot of the exception you face?

0

PS C:\windows\system32> Connect-MsolService
Connect-MsolService : The type initializer for 'Microsoft.Online.Administration.Automation.ConnectMsolService' threw an exception.
At line:1 char:1
+ Connect-MsolService
+ ~~~~~~~
+ CategoryInfo : OperationStopped: (:) [Connect-MsolService], TypeInitializationException
+ FullyQualifiedErrorId : System.TypeInitializationException,Microsoft.Online.Administration.Automation.ConnectMsolService

When I use the newer Powershell module I am able to log right in.

0

Here is the log file when it is connecting.

2017-04-04T09:14:28.5499803-07:00   Info        Logger.Initialize                           00000000-0000-0000-0000-000000000000    Logging initialized at level: Info
2017-04-04T09:14:28.5655994-07:00   Info        Logger.Initialize                           00000000-0000-0000-0000-000000000000    Logged in at: *******
2017-04-04T09:14:28.5655994-07:00   Info        MsolCmdlet.ProcessRecord                    00000000-0000-0000-0000-000000000000    Entering ProcessRecord.
2017-04-04T09:14:28.6905693-07:00   Info        ConnectMsolService.MsolCmdletProcessRecord  00000000-0000-0000-0000-000000000000    Entering MsolCmdletProcessRecord method.
2017-04-04T09:14:28.6905693-07:00   Info        ConnectMsolService.MsolCmdletProcessRecord  00000000-0000-0000-0000-000000000000    Windows Azure Active Directory Module for Windows PowerShell, Client Id : 50afce61-c917-435b-8c6d-60aa5a8b8aa7, Current Version : 1.1.8362.1
2017-04-04T09:14:28.6905693-07:00   Info        ConnectMsolService.MsolCmdletProcessRecord  028914f3-c778-43ea-ba71-2e90358863ba    Initializes a new instance of the CallDurationTracer class with connectMsolServiceString= Connect-MsolService.
2017-04-04T09:14:28.6905693-07:00   Info        ConnectMsolService.PromptForCredential      028914f3-c778-43ea-ba71-2e90358863ba    Prompting user for credentials
2017-04-04T09:14:43.3265326-07:00   Info        ConnectMsolService.EnsureProperMicrosoftOnlineInstance  028914f3-c778-43ea-ba71-2e90358863ba    Service instance autodiscovery succeeded.
2017-04-04T09:14:43.3265326-07:00   Info        ConnectMsolService.EnsureProperMicrosoftOnlineInstance  028914f3-c778-43ea-ba71-2e90358863ba    The default service instance will be used.
2017-04-04T09:14:43.3265326-07:00   Info        ConnectMsolService.MsolCmdletProcessRecord  028914f3-c778-43ea-ba71-2e90358863ba    Getting Live Token for user with Credential = *****@*****, FederationProviderId = microsoftonline.com, BecWebServiceLogonSiteName = ps.microsoftonline.com, Policy = MCMBI, BecWebServiceUri = https://provisioningapi.microsoftonline.com/provisioningwebservice.svc
2017-04-04T09:14:43.3265326-07:00   Exception   Connect-MsolService.Checking for retry      028914f3-c778-43ea-ba71-2e90358863ba    System.TypeInitializationException - The type initializer for 'Microsoft.Online.Administration.Automation.ConnectMsolService' threw an exception..    at Microsoft.Online.Administration.Automation.ConnectMsolService.MsolCmdletProcessRecord()
2017-04-04T09:14:43.3265326-07:00   Exception   InnerException                              028914f3-c778-43ea-ba71-2e90358863ba    Microsoft.Online.Administration.Automation.DynamicPInvokeException - Failed to get address for method: CreateIdentityHandle2 from library: C:\Program Files\Common Files\Microsoft Shared\Microsoft Online Services\msoidcli.dll. GetLastError code: 127.    at Microsoft.Online.Administration.Automation.NativeMethods.Initialize()
   at Microsoft.Online.Administration.Automation.LiveIdentityManager..ctor()
   at Microsoft.Online.Administration.Automation.ConnectMsolService..cctor()
2017-04-04T09:14:43.4514984-07:00   Info        MicrosoftOnlinePowershell                   028914f3-c778-43ea-ba71-2e90358863ba    Connect-MsolService=14777ms
2017-04-04T09:14:43.4514984-07:00   Exception   MsolCmdlet.ProcessRecord                    028914f3-c778-43ea-ba71-2e90358863ba    Microsoft.Online.Administration.Automation.MicrosoftOnlineException - Exception of type 'Microsoft.Online.Administration.Automation.MicrosoftOnlineException' was thrown..    at Microsoft.Online.Administration.Automation.ConnectMsolService.MsolCmdletProcessRecord()
   at Microsoft.Online.Administration.Automation.MsolCmdlet.ProcessRecord()
0

Here is the log file when using ver 1.2.166:

2017-04-04T09:45:57.3240343-07:00   Info        Logger.Initialize                           00000000-0000-0000-0000-000000000000    Logging initialized at level: Info
2017-04-04T09:45:57.3396413-07:00   Info        Logger.Initialize                           00000000-0000-0000-0000-000000000000    Logged in at: ******
2017-04-04T09:45:57.3396413-07:00   Info        MsolCmdlet.ProcessRecord                    00000000-0000-0000-0000-000000000000    Entering ProcessRecord.
2017-04-04T09:45:57.5896475-07:00   Info        ConnectMsolService.MsolCmdletProcessRecord  00000000-0000-0000-0000-000000000000    Entering MsolCmdletProcessRecord method.
2017-04-04T09:45:57.5896475-07:00   Info        ConnectMsolService.MsolCmdletProcessRecord  00000000-0000-0000-0000-000000000000    Microsoft Azure Active Directory Module for Windows PowerShell, Client Id : 50afce61-c917-435b-8c6d-60aa5a8b8aa7, Current Version : 1.2.166.0
2017-04-04T09:45:57.6365231-07:00   Exception   Config.AzureEnvironment                     a73423a6-0559-4b59-9570-5b073a66656b    System.ArgumentException - Cannot parse deployment type. Use default value: AzureCloud. 
2017-04-04T09:45:57.6365231-07:00   Info        ConnectMsolService.MsolCmdletProcessRecord  a73423a6-0559-4b59-9570-5b073a66656b    Initializes a new instance of the CallDurationTracer class with connectMsolServiceString= Connect-MsolService.
2017-04-04T09:45:57.6521492-07:00   Info        Connect-MsolService                         a73423a6-0559-4b59-9570-5b073a66656b    Authenticating user interactively
2017-04-04T09:45:57.6521492-07:00   Info        GetGraphResource, X:\bt\758328\repo\src\dev\PowerShell.V1\modules\psmodule\CommonFiles\AuthManager.cs#305   a73423a6-0559-4b59-9570-5b073a66656b    GetGraphResource() is called. End Point = AzureAD, AzureEnvironment = AzureCloud, AppendMSGraphVersion = False.
2017-04-04T09:46:09.1526178-07:00   Info        GetGraphResource, X:\bt\758328\repo\src\dev\PowerShell.V1\modules\psmodule\CommonFiles\AuthManager.cs#305   a73423a6-0559-4b59-9570-5b073a66656b    GetGraphResource() is called. End Point = MSGraph, AzureEnvironment = AzureCloud, AppendMSGraphVersion = False.
2017-04-04T09:46:09.8557707-07:00   Info        ConnectMsolService.EnsureProperMicrosoftOnlineInstance  a73423a6-0559-4b59-9570-5b073a66656b    Service instance autodiscovery succeeded.
2017-04-04T09:46:09.8557707-07:00   Info        Connect-MsolService                         a73423a6-0559-4b59-9570-5b073a66656b    Calling WebServiceProxy.MsolConnect
2017-04-04T09:46:09.8557707-07:00   Info        ConnectMsolService.Connect                  a73423a6-0559-4b59-9570-5b073a66656b    Entering Connect method.
2017-04-04T09:46:09.8557707-07:00   Info        Connect-MsolService                         a73423a6-0559-4b59-9570-5b073a66656b    Calling WebServiceProxy.MsolConnect
2017-04-04T09:46:10.2932905-07:00   Info        GetGraphResource, X:\bt\758328\repo\src\dev\PowerShell.V1\modules\psmodule\CommonFiles\AuthManager.cs#305   a73423a6-0559-4b59-9570-5b073a66656b    GetGraphResource() is called. End Point = AzureAD, AzureEnvironment = AzureCloud, AppendMSGraphVersion = False.
2017-04-04T09:46:10.8401858-07:00   Info        MicrosoftOnlinePowershell                   a73423a6-0559-4b59-9570-5b073a66656b    MsolConnect=881ms
2017-04-04T09:46:10.8401858-07:00   Info        MicrosoftOnlinePowershell                   a73423a6-0559-4b59-9570-5b073a66656b    Connect-MsolService=13195ms

1 Answer

0 votes
by (216k points)
selected by
Best answer

Hello,

To resolve the issue:

  1. Stop Softerra Adaxes Service.
  2. Uninstall Microsoft Online Services Sign-In Assistant.
  3. Download the Microsoft Online Services Sign-In Assistant here: https://www.microsoft.com/en-us/downloa ... x?id=41950 and install it.
  4. Start Softerra Adaxes Service.
0

That worked... Not sure where I messed up.

Thank you

0

For some reason, Microsoft has 2 editions of Microsoft Online Services Sign-In Assistant with exactly the same name and version :roll: It is very easy to get confused.

Related questions

0 votes
1 answer

We are receiving the following error when we attempt to add an Office 365 tenant into Adaxes. I'm able to log in fine via the powershell module. Here are the following ... of each of these, but receive the same results. Any help would be greatly appreciated!

asked Mar 2, 2017 by jhair (520 points)
0 votes
1 answer

We are receiving the error: Could not load file or assembly 'file:///C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\MSOnline\\Microsoft.Online.Administration. ... Powershell 4.0, have the latest prereqs and restarted the service twice. PLease advise.

asked Jun 6, 2017 by willy-wally (3.2k points)
0 votes
1 answer

Getting "object reference not set to an instance" when trying to sign into Office 365 Tenant Was working fine before

asked Sep 1, 2021 by davm79 (40 points)
0 votes
1 answer

Does the solution support working with multiple Office 365 tenants in the cloud-only scenario when there is no on-premise AD and all identity is managed via Azure Active Directory?

asked Apr 14, 2021 by Andrew Matveychuk (50 points)
0 votes
1 answer

This message is displaying inside the Office 365 properties for every user on this account/domain. Multi-Factor Authentication is disabled on the tenant account and I am able ... domains that are working with O365 without issue on the same servers as well.

asked Oct 24, 2019 by jhutchinson (20 points)
3,588 questions
3,277 answers
8,303 comments
548,090 users