SharePoint SOAP endpoints not accessible with OAuth2 authentication
Hi Developers,
As Microsoft has now enabled the new feature Enable Security Defaults with Microsoft Entra ID, we are facing issues in accessing the SOAP endpoints for SharePoint online. To resolve this issues we have been trying to move an existing code with SAML authentication to access SOAP endpoints to OAuth2 but I after getting the access token from OAuth2 & passing it as a header to SOAP endpoints it is giving an error as 401-Unauthorized. For this problem I have used below details for OAuth2
1. Registered the App on Azure Active directory.
2. Given necessary application & delegated permissions to app.
3. Added delegated permission for Microsoft Graph API.
4. Used scope value as “openid offline_access https://your-domain-name.sharepoint.com/.default“
5. Used endpoint as “https://your-domain-name.sharepoint.com/sites/site-name/_vti_bin/webs.asmx“
When we set scope value “https://graph.microsoft.com/.default” to generate access token, it gives error as 403-Forbidden.
When we disable the Security Defaults feature or enable the conditional access with P1 license the same code works fine.
Any assistance for this issue will be of a great help.
Thanks in advance!!!
Hi Developers, As Microsoft has now enabled the new feature Enable Security Defaults with Microsoft Entra ID, we are facing issues in accessing the SOAP endpoints for SharePoint online. To resolve this issues we have been trying to move an existing code with SAML authentication to access SOAP endpoints to OAuth2 but I after getting the access token from OAuth2 & passing it as a header to SOAP endpoints it is giving an error as 401-Unauthorized. For this problem I have used below details for OAuth21. Registered the App on Azure Active directory.2. Given necessary application & delegated permissions to app.3. Added delegated permission for Microsoft Graph API.4. Used scope value as “openid offline_access https://your-domain-name.sharepoint.com/.default”5. Used endpoint as “https://your-domain-name.sharepoint.com/sites/site-name/_vti_bin/webs.asmx” When we set scope value “https://graph.microsoft.com/.default” to generate access token, it gives error as 403-Forbidden.When we disable the Security Defaults feature or enable the conditional access with P1 license the same code works fine. Any assistance for this issue will be of a great help. Thanks in advance!!! Read More