Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request to have an option for "DOMAIN\username" in the Outlook Exchange Setup 5.0 script #1

Closed
rtrouton opened this issue Sep 23, 2015 · 11 comments

Comments

@rtrouton
Copy link

My Exchange server uses DOMAIN\username in the User name field of the Outlook 2016 account settings for an Exchange account. Would it be possible to add support for that in the script?

screen shot 2015-09-23 at 2 03 22 pm

I tried fixing this myself, by editing the set newExchangeAccount section of the script to use user name:WinDomain & "\\" & userShortName and adding a WinDomain value that references my domain as DOMAIN, but for some reason the Outlook login keeps displaying the email address in the User name blank, instead of DOMAIN\username.

@talkingmoose
Copy link
Owner

Hi Rich!

I can certainly add that. I've rarely found a need for it but should be fairly simple since I'm already getting the NETBIOS domain name using dscl earlier in the script. All you should need to do is change this toward the end of the script:

user name:userShortName

to this:

user name: netbiosDomain & "" & userShortName as string

Not sure what's happening with the issue displaying the email address. Very odd.

William Smith
Saint Paul, MN
bill@talkingmoose.net

On 9/23/15, 1:09 PM, "rtrouton" <notifications@github.commailto:notifications@github.com> wrote:

My Exchange server uses DOMAIN\username in the User name field of the Outlook 2016 account settings for an Exchange account. Would it be possible to add support for that in the script?

I tried fixing this myself, by editing the set newExchangeAccount section of the script to use user name:WinDomain & "" & userShortName and adding a WinDomain value that references my domain as DOMAIN, but for some reason the Outlook login keeps displaying the email address in the User name blank, instead of DOMAIN\username.

@nzmacgeek
Copy link

Ditto, I'm getting this as well.

set exchUsername to ("DOMAIN\\" & short user name of (system info))
    try
        set newExchangeAccount to make new exchange account with properties ¬
            {name:"Mailbox - " & userFullName, user name:exchUsername, full name:userFullName, email address:emailAddress, server:ExchangeServer, use ssl:ExchangeServerRequiresSSL, port:ExchangeServerSSLPort, ldap server:DirectoryServer, ldap needs authentication:DirectoryServerRequiresAuthentication, ldap use ssl:DirectoryServerRequiresSSL, ldap max entries:DirectoryServerMaximumResults, ldap search base:DirectoryServerSearchBase, receive partial messages:downloadHeadersOnly, background autodiscover:disableAutodiscover}
    on error

        -- something went wrong

        display dialog errorMessage & return & return & "Unable to create Exchange account." with icon stop buttons {"OK"} default button {"OK"} with title "Outlook Exchange Setup"
        error number -128

    end try

This should make Outlook configure with authentication such as DOMAIN\ADUserName, but I am getting f.lastname@company.com (I have customised the e-mail address generation part of the script...)

@jalgroy
Copy link

jalgroy commented Sep 30, 2015

This should make Outlook configure with authentication such as DOMAIN\ADUserName, but I am getting f.lastname@company.com

I'm having the same problem. It seems to me like this is a bug in Outlook 2016, specifically with the password dialog box. If I cancel the box prompting for a password, the user name field in account settings will be DOMAIN\username like I set it in the script.

The reason I think it is a bug in outlook is this: If you set up an account manually in account settings with DOMAIN\username as the user name and do not specify a password, it will prompt you for a password in a dialog box, but again, with your email as the user name. If I do the exact same thing in Outlook 2011, it will prompt you for a password, but with the correct DOMAIN\username as the user name.

Did any of you find a solution?

@talkingmoose
Copy link
Owner

I've been able to reproduce this issue and it's a bug with Outlook. This script only populates the user name field found in Outlook menu > Preferences > Accounts > Exchange account. The prompt to enter a user name and password is generated by Outlook when it's trying to authenticate the user (not generated by the script).

I'm reporting this bug to Microsoft with instructions for reproducing.

Thanks Rich, William and Joakim!

@poundbangbash
Copy link

+1
I'm seeing it, too. I've edited to use the UPN instead of the email address but email appears on login prompt.
Thanks for all your work on this script and following up with MS!

@seabash
Copy link

seabash commented Oct 9, 2015

Though we're not using Bill's script for Outlook 2016, this bug has also manifested for us—esp at AD password changes. Additionally, we've had to delete the Exchange item(s) in login.keychain outright, then let Outlook prompt for pw, opting to save to keychain.

@nzmacgeek
Copy link

Hey @talkingmoose - any luck getting more info from Microsoft?

@talkingmoose
Copy link
Owner

I know Microsoft is aware of the issue. Haven't tested 15.16 to see if it resolves the issue. I'll try that shortly. If it still occurs, I'll escalate again.

@poundbangbash
Copy link

Starting with Outlook 15.15 the initial setup of exchange takes the username properly from the account settings. However, if the user's keychain entry for Exchange is removed Outlook defaults back to the full email address.

As of Outlook 15.16 that keychain issue appears to be resolved as well.

@talkingmoose
Copy link
Owner

I could use some input with the following logic I've added to the script.

I've added a true/false option to add a domain prefix to the user name (e.g. TALKINGMOOSE\mmoose).

  1. If the script is set to use Active Directory to collect user information, I'm using that to read the NetBIOS domain name from the Mac and use that for the prefix.
  2. If the script is set to not use Active Directory, I'm providing a property the admin can edit to provide the NetBIOS domain name.

Does that sound like it meets the need?

@talkingmoose
Copy link
Owner

Final Release for 5.0.0 includes an option to specify NetBIOS domain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants