Hi,
Please support 21Vianet auth in nodejs runtime.
1.1.1
The following code is your current version, but just support office 365 international. In China, we use 21Vianet version, the auth url is ''https://accounts.accesscontrol.chinacloudapi.cn", please support it, thanks.
private getAuthUrl(realm: string): Promise<string> {
const url = `https://accounts.accesscontrol.windows.net/metadata/json/1?realm=${realm}`;
return nodeFetch(url).then((r: Response) => r.json()).then((json: { endpoints: { protocol: string, location: string }[] }) => {
const eps = json.endpoints.filter(ep => ep.protocol === "OAuth2");
if (eps.length > 0) {
return eps[0].location;
}
throw new AuthUrlException(json);
});
}
Hi @iiunknown,
Thanks for your message. We should add German cloud support as well.
While there is no native support in @pnp/nodejs for China cloud as a workaround you can use sp-pnp-node fetch client or similar based on node-sp-auth. I know it supports these options.
This is a great idea, thanks.
@koltyakov @patrick-rodgers Thanks you all great work.
Just added this to dev branch, will be part of today's beta so you can try it out.
Most helpful comment
Just added this to dev branch, will be part of today's beta so you can try it out.