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

Ndella LO 21 Reputation points
2022-10-03T12:33:08.123+00:00

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.
20,629 questions
0 comments No comments
{count} votes

Accepted answer
  1. JimmySalian-2011 42,071 Reputation points
    2022-10-03T12:48:14.217+00:00

    Hi,

    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.

    <system.net>
    <defaultProxy>
    <proxy
    usesystemdefault="true"
    proxyaddress="http://<PROXYADDRESS>:<PROXYPORT>"
    bypassonlocal="true"
    />
    </defaultProxy>
    </system.net>

    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
    2022-10-03T13:09:53.587+00:00

    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
    2022-10-03T13:32:43.35+00:00

    i have check version powershell 5.1 is already install.


  3. Ndella LO 21 Reputation points
    2022-10-04T10:17:31.597+00:00

    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:

    link: https://learn.microsoft.com/fr-fr/azure/active-directory/hybrid/reference-connect-accounts-permissions