Menu

Oauth Setup - Ticket 2 Mail

2023-11-27
2023-11-28
  • Michael Maertzdorf

    So I am having some difficulties setting up access to an oAuth Email box

    1) made an oAuth client (for Azure)
    2) made an application with the following GRAPH API access --
    - IMAP.AccessAsUser.All
    - offline_access
    - SMTP.Send
    - User.Read
    - Granted access for organization.
    3) Generated token

    For the Oauth client, do I enter here my admin account? or the email address of the mailbox(es) I want to access?

    As for the oAuth email client

    Mailbox Configuration
    Mail Server : outlook.office365.com
    Login: svc_tickets_XXX@xxxxx.xyx
    OAuth client: Azure (svc_tickets_XXX@xxxxx.xyx)
    Protocol: IMAP
    Port: 993
    Mailbox (for IMAP): Postvak IN
    Active: No
    Debug trace: Yes

    Debug trace is empty

    IMAP Mail at 993 --> Failed to initialize the mailbox: svc_tickets_XXX@xxxxx.xyx. Reason: cannot read - connection closed?
    IMAP Mail at 143 --> Failed to initialize the mailbox: svc_tickets_XXX@xxxxx.xyx.. Reason: cannot login, user or tokens

    My admin account has access to the svc_tickets_XXX account (all 3 access types).

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2023-11-27

    As far as I know: with the MS Azure account which has some form of access (e.g. "full access" permissions) on the mailbox. Cannot read is an error I haven't seen yet - are you sure the iTop server can connect to this port 993?

    143 - not sure why you'd use this one with Azure?

     
    • Michael Maertzdorf

      143?, because it's IMAP aswell (non-SSL)

      Yes, if I telnet to outlook.office365.com I get an answer back

       
      • Jeffrey Bostoen

        Jeffrey Bostoen - 2023-11-28

        Did you try the suggestion here: https://www.itophub.io/wiki/page?id=extensions:ticket-from-email

        Question: I can't access the mailbox content, I get an error: Reason: cannot read - connection closed?
        Answer: If you are trying to access a Mailbox with OAuth2, this message occurs when you have not specified ssl in the imap_options

        Configuration

        'combodo-email-synchro' => array (
            'imap_options' => array (
                 0 => 'imap',
                 1 => 'ssl',
            )
        
         
        • Michael Maertzdorf

          Hey,

          Thanks for that quick find.

          That did indeed solve that issue.

           

          Last edit: Michael Maertzdorf 2023-11-28

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.