Jump to content

Recommended Posts

I may have missed it on the forums but has MS teams integration come out of Beta? I did try implementing into one my business processes today without any luck. 

 

Share this post


Link to post
Share on other sites

Hi @chriscorcoran,

The Teams APIs are still in beta within Microsoft Graph, but our integrations were working with them the last time I looked... Are you getting any errors thrown when trying to use the integration?

Cheers,

Steve

Share this post


Link to post
Share on other sites

Hi @chriscorcoran,

Microsoft have changed the beta Post To Channel API  - both the URL and payload... So I've updated the integration, and it works as it should again. The updated operation should be available on your instance in the next few minutes. Let me know how you get on with this.

 Cheers,

Steve

Share this post


Link to post
Share on other sites

@Steve G only just had chnace to revisit this. This is the error I get 

iBridge Method: /Microsoft/Teams/Post To Channel.m Error: BadRequest: Bad Request...

image.png.9c31b9cffd5aa4d9220afdedc84dcd9c.png

Share this post


Link to post
Share on other sites

Hi @chriscorcoran,

I've just given the integration a whirl, and it's worked as expected for me. I have been able to replicate your issue though - it looks like the Channel ID is incorrect. Looking at your node config in that screenshot, the Channel ID doesn't appear to be in the correct format... If you replace what you have there with the threadId URL Param when you're looking at channel you want to post to (including the @thread.skype postfix), then it should work:

image.png

Cheers,

Steve

Share this post


Link to post
Share on other sites

@Steve G thanks, seems to have moved on to iBridge Method: /Microsoft/Teams/Post To Channel.m Error: Forbidden: Forbidden do I need to create a new key?

Share this post


Link to post
Share on other sites

@Steve G I have created a new key and that’s sorted it. Is there a way to post the description of the call in the post. The flowcode available to me are very limited. I tried a manual entry &[global["inputParams"]["requestId"]]&[global["flowcode"]["description"]] but just posts the SR ID.

Share this post


Link to post
Share on other sites

Hi @chriscorcoran,

Sure, you just need a Get Request Information node prior to the Cloud Automation node, so that you can use information returned by that in your calls to Teams, as so:

image.png

Cheers,

Steve

  • Like 1

Share this post


Link to post
Share on other sites

Sorry, not very technically minded here.

What would the integration mean for users? We use SM within our force, and are currently in the process of Win10 and the whole package including Teams coming into effect.

What could the users expect from the integration across both platforms?

Share this post


Link to post
Share on other sites

@Steve G just moved my test over to live and getting the following when I log a call iBridge Method: /Microsoft/Teams/Post To Channel.m Error: TypeError: Cannot read property 'status' of undefined

 

Any ideas?

Share this post


Link to post
Share on other sites

@Steve GI'm still geting the following error iBridge Method: /Microsoft/Teams/Post To Channel.m Error: TypeError: Cannot read property 'status' of undefined... 

then it wont move onto the next stage assigned to team.

I can try re run the last step and it posts but I still get the error 

image.png.8d98435d9a5813c26c86a236c826d9c7.pngI can 

Any ideas

Share this post


Link to post
Share on other sites

Hi @chriscorcoran,

Strange that it posts to Teams yet you get that error back, it doesn't appear to be the response params, it looks like you're not getting a HTTP response status back from Teams. Leave it with me and I'll take a look today.

Thanks,

Steve

Share this post


Link to post
Share on other sites

Hi @chriscorcoran,

I've not been able to replicate your issue, so I've added some enhanced logging to the Post to Channel operation to help with the debugging of thi issue. Could you give it 10 mins for the update to hit your instance, then try again and let me know once done so I can check the logs, please?

Cheers,

Steve

Share this post


Link to post
Share on other sites

Thanks @chriscorcoran, I'll review the logs and get back to you. I presume the re-run gave the same output?

Steve

Share this post


Link to post
Share on other sites

Hi @chriscorcoran,

Managed to get to the bottom of the issue with the extra logging, and it's now fixed. Could you give it 10 mins for the update to hit your instance and try again, please?

Let me know how you get on.

Cheers,

Steve

Share this post


Link to post
Share on other sites

Hi @chriscorcoran,

This is probably due to the Microsoft refresh token in your Keysafe Teams key expiring, so we're unable to generate a new access token with it...  

How this works is, when you first connect a Keysafe key to your Microsoft account, Microsoft give us 2 tokens for authentication of requests made against their API:

  • The access token - we use this to authenticate the Hornbill to Microsoft API requests. This token has a 1 hour shelf-life before it expires - at which point we need to generate a new access token with the refresh token, for any subsequent API calls;
  • The refresh token - this allows us (as in your Hornbill instance integrations) to create new access tokens once the access token expires. The refresh token lasts for 14 days.

So if the access token and the refresh token have both expired, then you need to revoke and reconnect your Keysafe key to your Microsoft account. I did make some changes in the last update of this integration to better handle the refreshing of tokens, so you should only have to do this once - as long as the integration is called at least once every 14 days.

Let me know how you get on.

Cheers,

Steve

Share this post


Link to post
Share on other sites

@Steve G Hi Steve

 

I thouht I woul dhave another go at posting to teams. I have just done a new token etc and on the business process I'm testing with I get a forbidden  to post to teams error. not sure why? Any thoughts?

 

image.png.eb0c004f1d4e89cb693e8775cd559412.png

Share this post


Link to post
Share on other sites

Hi @chriscorcoran,

The only ways I can replicate this error are:

  • If the channel is only allowed to be posted to by moderators, and the user who you created the keysafe key with is not a moderator (usually Team Managers);
  • If the user who you created the keysafe key with is not a member of the Team.

So I think it must be one of those scenarios? Forbidden would suggest a permissions issue, so I would check for either of the above...  

Cheers,

Steve

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...