简体   繁体   中英

How to sign in azure ad from node.js script(without browser flow)

I want to CALL api which needs azure ad authentication.
I succeeded azure ad authentication from browser sign in, but I also want to access to api from script. How can I sign in azure without browser sign in flow?

additional question.

I succeeded server-to-server authentication flow, but Is there way to call api as an "azure ad account"?

You can implement client credential flow in node.js which will not require browser.

  1. Please find document which can help you in adding Azure Active Directory modules for Node.js
  2. Please find code sample here which illustrates server-to-server authentication via client credentials flow.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM