Outlook 2016 autoconfigure

hkabik
Valued Contributor

Now that the schedules tab is removed from Outlook's preferences... has anyone figure out a way to apply a self configuration script like this one?

https://github.com/talkingmoose/Outlook-Exchange-Setup

Our users really enjoyed everything being automagically configured.

1 ACCEPTED SOLUTION

talkingmoose
Moderator
Moderator

More stuff ready for anyone who'd like to test...

I've devised a launchd setup that works well for me in my testing to automatically configure Outlook 2016 the first time it's launched. After a lot of research into launchd QueueDirectories and WatchPaths, the WatchPaths made the most sense because I can monitor for the existence of specific files. (Thanks, @eholtam, for your ideas. I adapted them for my own changes.)

The whole setup consists of one LaunchAgent file and two scripts. The only file you need to customize is the AppleScript. Everything else can just drop in place. The ROOT folder simply designates the "root" of the hard drive or "/". For now, be sure to keep the names and paths of the files and folders the same as I've created them unless you're comfortable changing the references in the three files.

I've also made minor changes to the AppleScript itself to better accommodate all potential settings not just Active Directory as well as accommodate this new setup.

You'll find everything here: https://github.com/talkingmoose/Outlook-Exchange-Setup-5.0

Click the Download ZIP button to the bottom right and locate these files in the ROOT folder:

  • /Library/LaunchAgents/net.talkingmoose.OutlookExchangeSetupLaunchAgent.plist
  • /Library/Talking Moose Industries/Scripts/Outlook Exchange Setup 5.0.scpt (customize this)
  • /Library/Talking Moose Industries/Scripts/OutlookExchangeLaunchAgent.sh

Feedback, as always, is greatly appreciated.

View solution in original post

220 REPLIES 220

rqomsiya
Contributor III

Hey all,

So look like there is no way to use @talkingmoose 's Apple Script with an unbound Mac when trying to setup Outlook 2016 with an on-prem Exchange server (non 0365)?

Thanks,
R

talkingmoose
Moderator
Moderator

@rqomsiya, the AppleScript for Outlook setup was designed for use with on-prem Exchange. It doesn't require Macs be bound to Active Directory but that does help with the lookup of user information.

MatG
Contributor III

@talkingmoose

We have tried a number of times to be able to do simple Outlook/Office 365 registration & setup but had no luck, its something we really want to crack.

Our issue is we authenticate to O365 with a different login to our email address
For example to login and activate O365 I'd use
mg1344@mycompany.net but my email address is griffinm@mycompnay.com

What we find is the outgoing email address is set to mg1344@mycompany.net and not griffinm@mycompnay.com even with the keys in Outlook this still fails to work

defaults write com.microsoft.Outlook OfficeActivationEmailAddress -string "mg1344@mycompany.net" defaults write com.microsoft.Outlook DefaultEmailAddressOrDomain -string "griffinm@mycompnay.com"

What it does is throw up the MS sign inbox with the griffinm@mycompnay.com which then fails as it needs mg1344@mycompany.net

I have had a number of emails back and forth with Jeff Kalvass on this but a fix does not see to be forthcoming from MS so perhaps its back to AppleScript to do this?

talkingmoose
Moderator
Moderator

@MatG, Jeff would be THE person who would know best about this feature. Has he indicated the feature got broken?

The only conditions you need in addition to the two you have are to ensure the OfficeAutoSignIn key in com.microsoft.office (note the different domain plist name) is set to TRUE and that you're running Office version 16.19 (released last November) or later.

MatG
Contributor III

It just fails to work as advertised, it seems to take the DefaultEmailAddressOrDomain item as your MS login so I on Outlook activation it then adds the outgoing email to this box when it should be login ID, (I've blanked it out as that is my real email)

I can forward the email trail if you want,, it goes back months now.

8c24f46b4eb54a89a9bc50d57c8ea659

talkingmoose
Moderator
Moderator

@MatG, instead of the email thread, can you post screenshots of your configuration profiles? In particular, screenshots of the Custom Settings payloads for both com.microsoft.autoupdate2 and com.microsoft.office.

Also, review the profile on your test Mac under Apple menu > System Preferences > Profiles. Do the addresses there look correct? In other words, is Jamf's configuration profile correct? If not, then Outlook won't be correct.

dpratl
Contributor II

Hi all,

Does anyone else had this problem:
Offline Address Book is not loading correctly. This folder stays empty: “~/Library/Group Containers/UBF…Office/Outlook/Outlook 15 Profiles/Main Profile/Caches/[Numbers]/Download/”
BUT: You are able to search the Directory / LDAP (Check Names and Address Book)

The reason we found out this is not working was because we were not able to add a Presenter to a Skype Meeting when planing the meeting. Error Message was "Cannot add presenter - Attendees that are not in your company cannot be assigned the presenter role"

Error Message in "~/Library/Containers/com.microsoft.Outlook/Data/Library/Caches/Microsoft/uls/com.microsoft.outlook/logs" is "Exchange account has not manifest URL. Nothing to do." (After :"OAB: Checking to see if we need to update OAB."

If i create a new profile via profile manager and add the Exchange account by hand it is working.

Would be interesting if somebody already had this problem and solved it.

Information:
- Macs bound to AD
- User are using mobile accounts with AD accounts

Thanks all
BR
Daniel

MacSysAdmin
Contributor

@MatG The issue you are seeing appears to be with how Outlook is handling the auth. We have the same issue and have opened a Premier case with Microsoft.

MatG
Contributor III

@ MacSysAdmin

Correct we cant seem to fix it.

Let me know if you find out more.

Eigger
Contributor III

@talkingmoose Does Outlook Setup 5 run once for every user? Or it only really run once period? Lets say I have a shared iMac thats being used by multiple staff, I want the Outlook Auto Setup to run once for the subsequent users. I asked because I see in postinstall script that it deletes the script when its done.

Edit: NVM, it only deletes the temp profiles.

talkingmoose
Moderator
Moderator

@Eigger, it's written in two steps:

  1. At every login, verifies whether Outlook has been configured at all (Exchange account or otherwise). If it verifies it has been configured, then the script halts and does nothing further.

  2. If at login the script determines Outlook has never been configured, it puts the pieces in place to configure Outlook the first time the app is launched. Once configured, it removes those pieces to prevent any more setups.

Hope that clears things.

talkingmoose
Moderator
Moderator

@MatG, making sure you see this:

Hi folks!

After working with another customer, I found my instructions in the blog post contained some wrong information that is probably the cause of the problems you're discussing here.

Specifically, I had written that all key/value pairs get added to the com.microsoft.office domain. That's wrong. Only two are for that domain and the third is actually for the com.microsoft.Outlook domain.

We've updated the blog post with the correct information and some additional information and screen shots around using an Extension Attribute to pull in additional information such as a User Principal Name.

Help users activate Microsoft Office 365 and configure Outlook in one click

Apologies for all the confusion! I know it can be frustrating to discover you followed all the steps correctly, but the steps were wrong.

kerouak
Valued Contributor

This seems to have stopped working in Catalina??

dpratl
Contributor II

Hi @talkingmoose,

Your Autoconfig is great up to Mojave, do you have plans to adapt it for Catalina as well? That would be so awesome :)
I'm getting this error in Catalina (10.15.5)
acf6848d0e6b46f9bf0e192689beab03

Thank you for all your scripts, applications, documents and so much more.
BR
Daniel

talkingmoose
Moderator
Moderator

@dpratl, I haven't tested my script on Catalina.

The error code you've shown is something for Jamf, and I don't recall adding anything specifically for Jamf. Have you modified it in any way or doing something different than the instructions in the wiki? I've had to learn a few tricks to make things work on Catalina. Just need to know where to look. (Look for a log file too in ~/Library/Logs for the user.

I have tested scripting in the new Outlook that currently in Insider Fast and that appears to be all kinds of broken in many ways. What version of Outlook are you testing? Also, if you can in any way move to Office 365 to take advantage of the configuration profile settings, that would be ideal.

rqomsiya
Contributor III

Hi @dpratl and @talkingmoose: I seem to have it working in Catalina running 16.37. Ping me on slack (@macm). Curious as to why its not working for you. We are currently using on-prem exchange so the script is super helpful for our techs.

talkingmoose
Moderator
Moderator

Thank you, @rqomsiya! If you kept track of any specific changes you made to the script for it to work on Catalina, I'm happy to update my repo.

rqomsiya
Contributor III

@dpratl : can you post the apple script you're using? I don't remember any major tweaks, but i'm happy to diff the one I have against your copy.

dpratl
Contributor II

@rqomsiya and @talkingmoose:
It was my fault, I'm sorry. The Volume License Serializer was not working anymore, because of that Office had no license and the script failed.
After a re-installation of the MacBook with the correct Serializer Office was activated and also the Profile creation worked. I was too fast with my post here, sorry for that. And thank you for your help :)

I also tested it with Office 2019 (>16.16.x) and it was working as expected. You guys do awesome work.

Have a great weekend
BR
Daniel

talkingmoose
Moderator
Moderator

@dpratl, thanks for the follow up. I am wholly amazed the script still works on Catalina. But I'm thrilled too.

talkingmoose
Moderator
Moderator

@dpratl, if you're on MacAdmins Slack, could you please lend your voice to this discussion? I'm chatting with the Outlook for Mac PM at Microsoft and we're discussing the future of AppleScript support for the new Outlook that's currently in Insider Fast. In my testing, the scripts completely break and they're trying to determine how to proceed.

https://macadmins.slack.com/archives/C0LAD22PL/p1591374468369200?thread_ts=1591374214.369100&cid=C0L...

If anyone else is concerned about automated setup for Outlook for Mac with on-premises Exchange servers (not Office 365), feel free to join the discussion!