User bio

Hello, I am Nick Hershberger, a Software Architect working at Finvi (formerly Ontario Systems), based in the US. I have roughly 20 years of experience with Intersystems products, starting in the summer of 1999 when I interned with Ontario Systems. Upon graduation from college in 2000 I started full time work with Ontario Systems using the screen editor to write Cache ObjectScript. In 2009, I left Ontario Systems and went to work for a client of theirs, building application features for the Ontario product built on top of Cache.

In 2014, my family and I began a five-year adventure with Wycliffe Bible Translators, three of which we spent living in the Eastern Highlands of Papua New Guinea. I wasn’t using any Intersystems technology during that time but managed the translation center help desk and eventually the Communications and Technical Services department. We returned to the US in 2019 and I returned to working full time with Ontario Systems, soon to be rebranded as Finvi, where I remain today.

In 2023, my wife Ashlie, and our four kids, Hannah, Gabe, Leah, and Sam, relocated to the Highlands of Scotland about 20 minutes north of Inverness. Living and working remotely in the Highlands and continuing to work with Intersystems technologies has been a great experience and privilege.

Show all
Munlochy, Scotland
Member since Dec 16, 2021
Replies:

I have been working on this same thing recently and kept running into the same problem. If you are still having issues, set the MechanismList property of the %Net.Authenticator instance to XOAUTH2 to limit the SASL authentication types the Start method of the authenticator instance looks for when it gets an AUTH response from the SMTP server.

    set smtp = ##class(%Net.SMTP).%New()
    set auth = ##class(%Net.Authenticator).%New()
    set auth.ServiceName = "smtp"
    set auth.UserName = "frodob@theshire.onmicrosoft.com"
    set auth.MechanismList = "XOAUTH2"
    set auth.AccessToken = accessToken
    set smtp.authenticator=auth

You can use the Create method of the Security.Users class to do that. Bear in mind that class is in %SYS. Documentation for Create is here: Security.Users.

set $nameSpace = "%SYS"
if '##class(Security.Users).Exists("testuser") {
    // Set properties
    set props("Enabled")=1
    set props("Name")=testuser
    set props("FullName")="Test User"
    set props("SuperUser")=0
    set props("NameSpace")="USER"
    set props("Roles")="%Developer,%Operator,TestRole"
    set props("Password")=userpassword
    set props("PasswordNeverExpires")=0
    set props("ChangePassword")=0
    set props("Routine")=""
    set props("ExpirationDate")=""
    set props("Flags")=1
    set props("EmailAddress")=""
    set status=##class(Security.Users).Create(user, .props)
    if $$$ISERR(status) {
        do $system.Status.DecomposeStatus(status, .err)
    }
}
Certifications & Credly badges:
Nick has no Certifications & Credly badges yet.
Global Masters badges:
Nick has no Global Masters badges yet.
Followers:
Nick has no followers yet.
Following: