Title: getting invalid_grant error
Last modified: August 1, 2022

---

# getting invalid_grant error

 *  Resolved [ksoms](https://wordpress.org/support/users/ksoms/)
 * (@ksoms)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/getting-invalid_grant-error/)
 * Trying to set up the plugin with the office 365;
 * At first had it working, but then had to use a different email account;
 * So I went and reset the plugin, deleted the postman app and client secret I made
   in azure originally; and made all new ones with the new user account I created.
 * Everything works until I try to send a test, it says “invalid_grant” and there’s
   no solution in the log.
 * Originally, when I set it up, I had to go and give office 365 permission after
   finishing the initial set up; but after I reset the plugin and did all new credentials
   and everything, it never gave me that give it permission thing again; and every
   time I try to redo this, it always says office365 is configured! and doesn’t 
   give me the option… so is this the grant issue?
 * Extremely frustrating as I’ve been trying to make this plugin work for hours.
   every user I’m putting into this has full global, exchange, user, and every other
   role and permission necessary to make this work….
 * below is the info from the ‘diagnostic test’ if that’s applicable:
    _________
 *     ```
       Mailer: postsmtp
       HostName: applicheminc.com
       cURL Version: 7.58.0
       OpenSSL Version: OpenSSL/1.1.1
       OS: Linux node.agilecollab.ca 4.15.0-117-generic #118-Ubuntu SMP Fri Sep 4 20:02:41 UTC 2020 x86_64
       PHP: Linux 7.4.30 en_US.UTF-8
       PHP Dependencies: iconv=Yes, spl_autoload=Yes, openssl=Yes, sockets=Yes, allow_url_fopen=Yes, mcrypt=No, zlib_encode=Yes
       WordPress: 6.0.1 en_US UTF-8
       WordPress Theme: Ohio
       WordPress Plugins: Advanced Custom Fields PRO, Contact Form 7 Extension For Mailchimp, Contact Form 7, Elementor, Envato Market, Smash Balloon Instagram Feed, WPBakery Page Builder, Limit Login Attempts Reloaded, Ohio Extra, Ohio Importer, Ohio Portfolio, Office 365 for Post SMTP Extension, Post SMTP, Slider Revolution, WooCommerce, Yoast SEO, WP Super Cache
       WordPress wp_mail Owner: /var/www/vhosts/old.applicheminc.com/applicheminc.com/wp-content/plugins/post-smtp/Postman/PostmanWpMailBinder.php
       WordPress wp_mail Filter(s): wp_staticize_emoji_for_email, PostsmtpMailer->get_mail_args
       WordPress phpmailer_init Action(s): wpcf7_phpmailer_init
       Postman: 2.1.3
       Postman Sender Domain (Envelope|Message): applicheminc.com | applicheminc.com
       Postman Prevent Message Sender Override (Email|Name): No | No
       Postman Active Transport: Office365 API (https://amazonses.com:443)
       Postman Active Transport Status (Ready|Connected): Yes | Yes
       Postman Deliveries (Success|Fail): 7 | 3
       ```
   
 * _________________
 * Please help!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [ksoms](https://wordpress.org/support/users/ksoms/)
 * (@ksoms)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/getting-invalid_grant-error/#post-15879141)
 * Ok I figured it out after a long time.
 * There was a “/” missing from the domain redirect in the app manifest in azure
   for some reason, fixed that and everything works smoothly.
 * Microsoft is unreal complex for the simple person man. wow.
 *  [M Haseeb](https://wordpress.org/support/users/haseeb0001/)
 * (@haseeb0001)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/getting-invalid_grant-error/#post-15880666)
 * [@ksoms](https://wordpress.org/support/users/ksoms/) Hi,
 * Great thanks for the update.
 * Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘getting invalid_grant error’ is closed to new replies.

 * ![](https://ps.w.org/post-smtp/assets/icon-128x128.gif?rev=3209655)
 * [Post SMTP – Complete Email Deliverability and SMTP Solution with Email Logs, Alerts, Backup SMTP & Mobile App](https://wordpress.org/plugins/post-smtp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-smtp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-smtp/)
 * [Active Topics](https://wordpress.org/support/plugin/post-smtp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-smtp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-smtp/reviews/)

## Tags

 * [invalid](https://wordpress.org/support/topic-tag/invalid/)
 * [office365](https://wordpress.org/support/topic-tag/office365/)
 * [Setup](https://wordpress.org/support/topic-tag/setup/)

 * 2 replies
 * 2 participants
 * Last reply from: [M Haseeb](https://wordpress.org/support/users/haseeb0001/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/getting-invalid_grant-error/#post-15880666)
 * Status: resolved