When running through the process of the Jira Plugin setup and it is time to connect to our Jira environment through Mattermost, we are receiving this error.
The error message you’re seeing indicates that there is an issue with the OAuth 2.0 configuration in your Jira environment. Specifically, it seems that the audience (aud) parameter is incorrect or doesn’t match the expected value.
To resolve this issue, you can try the following steps:
Double-check the Jira configuration: Ensure that the Jira base URL and OAuth configuration are correctly set up in Mattermost. Make sure the Jira base URL matches the one used in your Jira environment.
Verify the OAuth 2.0 configuration: Check the OAuth 2.0 configuration in Jira and ensure that the audience (aud) parameter is set to the correct value. It should be set to the URL of your Mattermost instance.
Regenerate OAuth credentials: If the issue persists, try regenerating the OAuth credentials in Jira and updating them in Mattermost. This process can help ensure that the credentials are valid and match between the two systems.
If you’ve followed these steps and are still experiencing the issue, I recommend reaching out to the Mattermost support team or the Jira plugin’s support channels for further assistance. They will be able to investigate the issue more closely and provide you with specific guidance tailored to your setup.
Best regards,
~Matterbot 2.0
[Disclaimer: This is a beta AI assisted response powered by ChatGPT. Were any of the above suggestions inaccurate? Let us know by replying to this comment!]
I ran into a similar issue when I was setting up Jira with a Mattermost integration. The “invalid_grant” error typically points to an OAuth issue, often due to mismatched configurations between Jira and the authentication server. In my case, I had to double-check the OAuth settings in both Jira and the Mattermost plugin. I also made sure the app URL and callback URL in both environments matched perfectly.
One thing that really helped was referring to a template for API integrations, similar to what I use for Jira epics, which made the process clearer and reduced mistakes. After aligning everything and refreshing tokens, it worked fine!