Initialise Azure Application Client in TypeScript

Viewed 17

New to Typescript and still getting used to Microsoft Azure so please excuse the basic question.

I have created an Enterprise Application which should be able to log into the Graph API and read a user profile. I have the client id/secret , tenant id but I need to know how to initialise this client within TypeScript.

Am i supposed to initialise a GraphClient or is there a a generic Client I can use?

A link to a tutorial/example or documentation on how to do this would be amazing.

For context I want to be able to write one function to initialise the client and subsequently write the query- all the docs talk about multiple files which I cannot utilise because I am writing this as a third party integration.

I have found this but it seems very complex and I can't really follow it.

Is there a typescript equivalent of

client_credential = ClientSecretCredential(tenant_id, client_id, client_secret)
client = GraphClient(credential=self.client_credential,
                     scopes=['https://graph.microsoft.com/.default']
)
0 Answers
Related