OAuth for Microsoft Continuous Signout

I created a pack to connect to Microsoft APIs and it is working beautifully. However, I am constantly getting signed out of my microsoft connection. Is the ability to stay signed in or connection duration set up on the Coda pack side or on the Azure App Registration side? I’d love to be able to stay signed in. Please advise.

Hi @Leo_Gutierrez2 - Getting signed out of the Pack is usually a sign that you aren’t successfully getting a refresh token during the OAuth flow. If you haven’t already, take a look at the Microsoft sample Pack, since I think it is fetching refresh tokens correctly:

Yes, my code is an exact replica of the sample code for authentication. The only thing I changed was the scope to allow read/write.

OK, thanks for confirming. I tested that code some more, and I’m still not entirely sure what the .default scope includes, but I confirmed that I can get the token to refresh when using these scopes:

  scopes: [
    "User.Read", "offline_access"
  ],

Can you try these scopes (or at least adding the offline_access scope and see if that helps?

Whoops, I just realized that the sample I linked to already included this, just my old working copy did not for some reason.

I just added it. I will let you know if that works. Thanks, Erik!

Regards,