Forum Discussion

WSD's avatar
WSD
Frequent Visitor
2 years ago
Solved

Sharepoint connection credential expiring

For one of the reports I am working on, part of the datasource is a connection to a sharepoint folder. 

Now I am using my personal company account to provide credentials for the sharepoint. 
My problem arises from the scheduled updates of the report. 

Currently I have to reauthentificate every 24-48 hours. Which adds manual work in a report, that should be completely automated and should need minimal support. 
Is there a way to extend the time it takes, before the credentials expire? 
Is this a potential issue on the server side, or does it come from settings regarding my company account?
I will not have access to anything account related, but just a general hint, what the best practice would be in this situation, would already be appreciated.

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi, WSD 

    Frequent expiration of credentials can be due to OAuth2 token settings. By default, access tokens have a limited lifetime for security reasons. Like Bendlin said, you can ask your IT department to extend the token lifetime or implement a refresh token to automatically renew the access token without manual intervention. You can refer to the following link:

    How to extend the expiry of access token so I don't have to refresh as often - Microsoft Q&A


    This issue can also stem from a server-side security policy set by your organization. These policies may need to be reauthenticated periodically to ensure secure access to sensitive data. Consulting with your IT or SharePoint administrator can provide insight into whether these policies can be adjusted. Here is the link:

    Manage guest expiration for a site - Microsoft Support


    If you have access to someone who can run PowerShell scripts, they may be able to change the IPAddressWACTokenLifetime parameter to extend the lifetime of the token.

    Your session has expired in Office Online - Microsoft 365 | Microsoft Learn


    Another approach is to use app-only credentials for SharePoint access. This method involves setting up an app with the necessary permissions in Azure AD and authenticating with its credentials. This can provide a more stable and long-lasting connection. You can check the following link:

    proconnector.hingepoint.com


    Make sure that the scheduled refresh settings for the report are optimized. Sometimes, adjusting the refresh rate or timing can help reduce the need for frequent re-authentication.

     

    How to Get Your Question Answered Quickly 

    Best Regards

    Yongkang Hua

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • yes, OAUTH tokens expire.  Talk to your company's auth/cyber team to see what limits they have set. You can also use jwt.io to check this for your token.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi, WSD 

    Frequent expiration of credentials can be due to OAuth2 token settings. By default, access tokens have a limited lifetime for security reasons. Like Bendlin said, you can ask your IT department to extend the token lifetime or implement a refresh token to automatically renew the access token without manual intervention. You can refer to the following link:

    How to extend the expiry of access token so I don't have to refresh as often - Microsoft Q&A


    This issue can also stem from a server-side security policy set by your organization. These policies may need to be reauthenticated periodically to ensure secure access to sensitive data. Consulting with your IT or SharePoint administrator can provide insight into whether these policies can be adjusted. Here is the link:

    Manage guest expiration for a site - Microsoft Support


    If you have access to someone who can run PowerShell scripts, they may be able to change the IPAddressWACTokenLifetime parameter to extend the lifetime of the token.

    Your session has expired in Office Online - Microsoft 365 | Microsoft Learn


    Another approach is to use app-only credentials for SharePoint access. This method involves setting up an app with the necessary permissions in Azure AD and authenticating with its credentials. This can provide a more stable and long-lasting connection. You can check the following link:

    proconnector.hingepoint.com


    Make sure that the scheduled refresh settings for the report are optimized. Sometimes, adjusting the refresh rate or timing can help reduce the need for frequent re-authentication.

     

    How to Get Your Question Answered Quickly 

    Best Regards

    Yongkang Hua

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.