How to retrieve a variable from a script to put in another script

asked 2020-08-20T14:10:02.253+00:00
ahmed haouchette 1 Reputation point

Hello I have a little problem with my project which uses the Microsoft Graph API. I need to implement a REST API that retrieves users' shared calendar from an Azure AD. I use NodeJS and express for this.

Here is the handlebars:


I implemented a script (script.js) which retrieves the username of the users (the username corresponds to their email address):


Now that I get the email address of the person I want to consult his calendar I would have to pass this variable in a function of another script (graph.js):


I would like instead of the giveUser () function in the getSharedCalend to put the email address of the person who has been checked in the .hbs
Thank you in advance for your help.

Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
12,559 questions
{count} votes

1 answer

Sort by: Most helpful
  1. answered 2020-08-21T20:55:39.723+00:00
    James Hamil 11,786 Reputation points Microsoft Employee

    Hi, have you tried using Asynchronous callbacks?

    No comments