AD Connect Setup V2.1.16 - Object reference not set to an instance of an object

Ndella LO 21 Reputation points

we have a issuing when we try to add new forest domain for new ad connect 2.16.
"An error has occured NullReferenceException Object reference not set to an instance of an object "247073-error-ad-connect.png

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,890 questions
0 comments No comments
{count} votes

Accepted answer
  1. JimmySalian-2011 41,936 Reputation points


    It seems you have a proxy server and AAD Connect is trying to connect to Azure but fails, you will have to open up machine.config to make the changes.

    If you're using an outbound proxy for connecting to the internet, the following setting in the C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config file must be added for the installation wizard and Azure AD Connect sync to be able to connect to the internet and Azure AD.


    Also check PowerShell and .Net version, the Azure AD Connect depends on Microsoft PowerShell 5.0 and .NET Framework 4.5.1. You need this version or a later version installed on your server.

    Hope this helps.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Ndella LO 21 Reputation points

    hello Jimmy

    the server are acces to internet directely and we have alraidy add some forest/domaine .
    the issuing is just whe we try to add a onther forest / domain. we have this errors.

    we have framework 4.7 installed on serv.

    does we need to update for powershel v 5 ?

  2. Ndella LO 21 Reputation points

    i have check version powershell 5.1 is already install.

  3. Ndella LO 21 Reputation points

    hello team

    this is resolve.

    we created a local account and give it the necessary rights for the replications;
    at the ADCONNECT, we chose this account by default for the domain during the creation. and we could go to the next step for the choice of OU.
    Thanks to all for the support;

    the rights for the account to be created are on the link: