Share via

How to access China 21V SharePoint using Python?

Neil 0 Reputation points
2023-06-21T02:45:39.25+00:00

I need to using Python to access China 21V SharePoint.

When I access Global SharePoint with Office365-REST-Python Client it was work.

But when I access China 21V SharePoint the code is show "invalid_request"

User's image

User's image

Microsoft 365 and Office | SharePoint Server | For business
Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft 365 and Office | SharePoint Server | Development

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-06-21T06:21:10.89+00:00

    Hi @Neil,

    The SharePoint Development Tag focuses on general issues of SharePoint troubleshooting. Since your question is related to Python, this is outside our support scope.

    For untestable reasons,

    Here are some ideas that I hope will help you:

    please try:

    When you use the Office21-REST-Python client to access China 365V SharePoint, you encounter an "invalid_request" error, which may be due to the following reasons:

    Authentication endpoint: China 21V SharePoint uses a different authentication endpoint than the global version of SharePoint. You need to set the authentication endpoint to the endpoint of China 21V SharePoint.

    Proxy and Firewall Restrictions: Network proxy and firewall settings may cause connection issues when accessing China 21V SharePoint. Please make sure your network environment allows communication with China 21V SharePoint and check if any proxy needs to be configured.

    Permission Issues: Make sure your application has sufficient permissions to access China 21V SharePoint. Check the permissions granted to the application in the Azure portal or the SharePoint application catalog to ensure it has the appropriate scope and permissions.

    API version compatibility: Verify that the Office365-REST-Python client you are using is compatible with the API version of China 21V SharePoint. Some features and endpoints may vary due to version differences. Please make sure that the client you are using matches the API version of China 21V SharePoint.

    If you have confirmed these issues and still have questions, please try asking questions on this platform.

    Hope this helps you.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best Regards

    Cheng Feng

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.