web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to logon to site along with username and password

(0) ShareShare
ReportReport
Posted on by 40

Hi Experts,

I have an requirement to open some site along with the username and password using x++ code.

I am able to open the site using the below code.

myBrowser.Navigate(strFmt("XXX"), true);

How to provide username and password if i need to logon to that url. Is this solution possible.

Please help me.

Thanks in Advance :)

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    239,592 Most Valuable Professional on at

    Is the managed host control necessary from the business perspective? Do you realize that you wouldn't be able to upgrade it to any newer version of AX?

    What if you simply open the page in a browser?

    I realize that it doesn't answer your question, but maybe we can make the problem simpler before we start.

  • Harika Profile Picture
    40 on at

    Thanks Martin for your response.

    Manage host control is not necessary from the bussiness perspective.  Yes they will upgrade to newer version of AX.

    But according to the business requirement : The button will be present in the Released products form.

    If they already are logged in to NOBB, they will directly pass the item number to open.

    If are not logged in, they need to enter username and password before getting directly to the item.

    My question is how to pass username and password to logon to the site.

    Thanks in advance :)

  • Martin Dráb Profile Picture
    239,592 Most Valuable Professional on at

    You're talking about passing username and password from AX, but is it what the requirement says? I understand it in this way:

    • If user is logged into NOBB, no additional login is needed.
    • If not, the web page will ask the user for username and password; AX will never seen that.

    Is my understanding wrong?

    What happens if you log into NOBB and then open a new browser window and navigate to an URL that you would store in AX? Doesn't it already work as required? If so, you'll simply open the right URL from AX and you're done.

    If you had username and password stored somewhere in AX and you would want to pass it into the web application, the first thing to do would be finding out what authentication mechanism the applications uses (e.g. OAuth, HTTP authentication, something custom...). Note that I have no idea what NOBB is.

  • Harika Profile Picture
    40 on at

    Hi Martin

    If the user is already logged on to particular Website in some browser say for Eg. Chrome and using navigate it is not sure that the URL will be opened in the same browser. It may open in other browser.

    For this reason i am checking the possibility of passing the username and password  along with the URL then there will not be such issue. By doing so I can make the customer login into the website.

    Please suggest me the ways to proceed if I know the authentication details, and achieve the requirement.

    Thanks in advance:)

  • Martin Dráb Profile Picture
    239,592 Most Valuable Professional on at

    I think you're still making up something that doesn't exist in the requirement. Let me remind you what they said:

    • If they already are logged in to NOBB, they will directly pass the item number to open.
    • If are not logged in, they need to enter username and password before getting directly to the item.

    It doesn't say anything about storing passwords in AX and logging on behalf of users. It sounds to me that they intentionally don't want to take the liability for storing and maintaining user credentials in AX.

    Regarding the default browser, I think that interpreting "if they already are logged in" can be meaningfully applied to the default browser only. If they decide to use another one, they'll simply follow the path of "they need to enter username and password before getting directly to the item".

    In theory, you could start a particular browser (e.g. Chrome), but you have no way to find out in which browsers users are logged in. You also don't know which browsers they have installed and where.

    I think you should go back to the client and clarify the requirements. You don't want to invest a lot of time to something that they actually don't want, do you?

  • Harika Profile Picture
    40 on at

    Hi Martin,

    If are not logged in, they need to enter username and password before getting directly to the item. 


    According to this i mean that they need to pass username and password through code along with the website URL. And i am checking is this requirement is possible or not through AX.

     

     

  • Martin Dráb Profile Picture
    239,592 Most Valuable Professional on at

    Who are "they" in your opinion? My understanding is that "they" are users of NOBB, therefore if [users] are not logged in, [users] need to enter username and password before getting directly to the item.

    How else do you read the requirement? "They" can't mean AX, because AX won't be logged into NOBB. Users will. And users will enter their credentials.

    Maybe there is a bug in the requirement, but as I don't have access to the client to discuss it, I must hold to the requirement we have.

  • Harika Profile Picture
    40 on at

    Is there any possibility in AX where we can open a website along with username password through code.

    I may add some dialogue where user gives username and password by fetching those values i can navigate to the website with the credentials provided. Is this possible.

  • Martin Dráb Profile Picture
    239,592 Most Valuable Professional on at

    It's possible, but there is no universal solution for different things. That's why I said that "the first thing to do would be finding out what authentication mechanism the applications uses (e.g. OAuth, HTTP authentication, something custom...)".

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 28

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans