Skip to main content
Solved

Microsoft Graph Type Application Web Connection's Token keeps expiring


ninixink
Contributor
Forum|alt.badge.img+3

Hi everyone,

We are using this web connection MS Graph Type Application https://hub.safe.com/publishers/supporter/web-connections/microsoft-graph-type-application

We have the required details below: 

- Tenant-ID

- Client-ID

- Client Secret

However, this keeps expiring every hour and we have to re-authenticate every time. Screenshot of the expiry time below:

tokenExpiryTImeIs there a solution to this? There are other articles about Microsoft Graph Teams but the configuration is different.

In our configuration, we keep the default setting and I notice the grant_type=client_credentials.

MsGraphTypeApp1. Do we need to ask our Cloud team to grant us a refresh token & grant_type = refresh_token?

2. Also, do we need to ask them to add the fmeoauth URL to the Redirect URI in the MS Graph App like how we normally do with other Oauth2 App?

If these need to be added, should they be mentioned in the hub?

Many thanks!

Best answer by ninixink

merlinegeorge wrote:

Thanks @Merline George​  - Let me know if it's better I delete this thread.

I just copy the reply I replied in the other thread:

 

We finally resolved this issue with HTTPCaller and didn't use the Web Connection.

We reached out to MS support and there are 2 different Oauth2 flows - Oauth2 client credential flow (App Identity flow) or the Oauth2 code grant flow (User Identity flow). The one that we are using is App identity flow as this allows us to read multiple mailboxes including shared mailboxes. These mailboxes will need to be added to a security group that links with our App (Application ID/ Client ID).

So what we did was:

Hope that helps if anyone else has the same issue with MS Graph API reauthentication.

Thanks! 🙂

View original
Did this help you find an answer to your question?

2 replies

merlinegeorge
Safer
Forum|alt.badge.img+5

ninixink
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • Best Answer
  • April 27, 2023
merlinegeorge wrote:

Thanks @Merline George​  - Let me know if it's better I delete this thread.

I just copy the reply I replied in the other thread:

 

We finally resolved this issue with HTTPCaller and didn't use the Web Connection.

We reached out to MS support and there are 2 different Oauth2 flows - Oauth2 client credential flow (App Identity flow) or the Oauth2 code grant flow (User Identity flow). The one that we are using is App identity flow as this allows us to read multiple mailboxes including shared mailboxes. These mailboxes will need to be added to a security group that links with our App (Application ID/ Client ID).

So what we did was:

Hope that helps if anyone else has the same issue with MS Graph API reauthentication.

Thanks! 🙂


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings