Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

AIF Service cannot be run with Windows Authentications

(0) ShareShare
ReportReport
Posted on by 95

Dear Community ,

                                I have deployed the Webservice using basicHttpBinding in AIF Inbound Port and it is deployed in IIS as shown below figure

           pastedimage1597388750978v1.png

The Service is deployed with IDENTITY of ERPUser  as can be seen in the above image and Windows Authentication is enabled on it.

I can consume the application using .Net Application by passing credentials of ErpUser and it get effected on each table in ax Purchase and Sales 

When I am trying to access using ErpTest user ( same role in AX like ErpUser ) in my .Net Application . The different operations are performed under the credentials of ErpUser only .

My Requirement is I want to consume the service using ErpTest User .

I want to have erptest user to be registered on AX Tables whenever any changes happened in AX using .Net Client Application by passing ErpTest Credentials 

Kindly shed some light on it.

Thanks In Advance.

  • Gunjan Bhattachayya Profile Picture
    35,421 on at
    RE: AIF Service cannot be run with Windows Authentications

    Hi Abdul,

    Please update if this issue was resolved.

  • Gunjan Bhattachayya Profile Picture
    35,421 on at
    RE: AIF Service cannot be run with Windows Authentications

    Abdul,

    I changed the Application Pool user to the AOS account and it still works fine.

    Please try that option anyway and check if it works for you.

    Please share the App.config settings for the .NET application as well.

  • rizwan Profile Picture
    95 on at
    RE: AIF Service cannot be run with Windows Authentications

    Hi Bhattacharya,

    Application Pool User is different  than bussiness connector user in  AX 2012

    I will make the application Pool Identity User with User configured in Bussiness Connector and will reply you back

    Thanks for responding

  • Suggested answer
    Gunjan Bhattachayya Profile Picture
    35,421 on at
    RE: AIF Service cannot be run with Windows Authentications

    Abdul,

    Is the user configured for the application pool the same as your business connector proxy user? I have the same settings as you do on my Dev box and it works without any issues

    Please share the App.config settings for your .NET application as well. 

  • rizwan Profile Picture
    95 on at
    RE: AIF Service cannot be run with Windows Authentications

    Hello Bhattacharyya,

                                      The Below Settings for WebService SGNInventQuarantineServiceHttpPort and the same settings are available for Default Website : 

    pastedimage1597387368807v1.png

    the below picture shows the application pool where ErpUser is defined at Identity column and by default the service is running on behalf of this user ( this user is get registered on AX Tables ) 

    pastedimage1597388524432v2.png

    ............................................................................................................................................................................................................................................

    For Below Code , I am able to process the operations but the operations are performed behalf of ErpUser ( The Modified field in AX Table is ErpUser )

    client.ChannelFactory.Credentials.UserName.UserName = @"sgn\ErpTest";
    client.ChannelFactory.Credentials.UserName.Password = @"Axa6";

    .......................................................................................................................................................................................................

    For Below Code , I am able to process the operations but the operations are performed behalf of ErpUser ( The Modified field in AX Table is ErpUser )

    client.ClientCredentials.UserName.UserName = @"sgn\ErpTest";
    client.ClientCredentials.UserName.Password = @"Axa6";

    .................................................................................................................................................................................

    For Below Code, I am getting this error "{"Failed to logon to Microsoft Dynamics AX."}"

    client.ClientCredentials.Windows.ClientCredential.UserName = @"sgn\ErpTest";
    client.ClientCredentials.Windows.ClientCredential.Password = @"Axa6";

    I want to have ErpTest User should be effected on AX Tables . 

    I request to community to kindly suggest me for the above problem

    Thanks In Advance.

  • Gunjan Bhattachayya Profile Picture
    35,421 on at
    RE: AIF Service cannot be run with Windows Authentications

    Hi Abdul,

    Could you please share the .net application code you are using to connect and also a screenshot of the AIF website authentication settings?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,206 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,968 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans