OneDrive / samples

Contains samples, scenarios, and guidance for integrating with OneDrive and SharePoint drives, drive items, and files.
MIT License
58 stars 59 forks source link

Rate limit headers are not coming for app registered in SharePoint #42

Closed manjunathreddy1 closed 1 year ago

manjunathreddy1 commented 1 year ago

Describe the bug I have registered SharePoint app directly in SharePoint site (not as Azure AD app) using the pages appnegnew.aspx and appinv.aspx. I noticed that if I get the token for this app using following code rate limit headers are not coming up. But if register the app in Azure AD and use the following code rate limit headers are coming up. Please help to confirm if this the expected behavior or not. var clientId = ""; var clientSecret = ""; var siteUrl = "";

PnP.Framework.AuthenticationManager authManager = new PnP.Framework.AuthenticationManager(); var sharePointAccessToken = authManager.GetACSAppOnlyContext(siteUrl, clientId, clientSecret).GetAccessToken();

To Reproduce Steps to reproduce the behavior: Register the app directly in SharePoint site and not in Azure AD and use the above code.

patrick-rodgers commented 1 year ago

Please report this issue in the correct repository. Thanks!