Skip to content

How to authenticate sharepoint on 21vianet #932

Open
@arrebnac

Description

@arrebnac

I tried to authenticate my Sharepoint on 21vianet with client secret, but it reported '401 Client Error: Unauthorized for url: https://graph.microsoft.com/v1.0/web/getFileByServerRelativePath%28DecodedUrl%3D%27https://galab.sharepoint.cn/:x:/g/EdLtDQIxUHxLj0FuemeleMsBaczbg7-bNKcqyDIyHR5utA%3Fe%3DO04gLy%27%29/%5C%24value'

I have identify the authority url and acquire token url by using the url of "https://login.chinacloudapi.cn/{0}".format(test_tenant) and "https://microsoftgraph.chinacloudapi.cn/.default" according to https://learn.microsoft.com/en-us/previous-versions/office/office-365-api/api/o365-china-endpoints

Please see my screenshot as below

Image

Could you help me where is my code's problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions