Skip to main content

MicrosoftGraphClient

Home > @backstage/plugin-catalog-backend-module-msgraph > MicrosoftGraphClient

A HTTP Client that communicates with Microsoft Graph API. Simplify Authentication and API calls to get User and Group from Microsoft Graph

Uses msal-node for authentication

Signature:

class MicrosoftGraphClient 

Constructors

ConstructorModifiersDescription
(constructor)(baseUrl, tokenCredential)Constructs a new instance of the MicrosoftGraphClient class

Methods

MethodModifiersDescription
create(config)staticFactory method that instantiate msal client and return an instance of MicrosoftGraphClient
getGroupMembers(groupId, query, queryMode)Get a collection of User belonging to a Group from Graph API and return as AsyncIterable
getGroupPhoto(groupId, sizeId)
getGroupPhotoWithSizeLimit(groupId, maxSize)Get profilePhoto of Group from Graph API with size limit
getGroups(query, queryMode)Get a collection of Group from Graph API and return as AsyncIterable
getGroupUserMembers(groupId, query, queryMode)Get a collection of User belonging to a Group from Graph API and return as AsyncIterable
getOrganization(tenantId)Get Organization from Graph API
getUserPhoto(userId, sizeId)
getUserPhotoWithSizeLimit(userId, maxSize)Get profilePhoto of User from Graph API with size limit
getUsers(query, queryMode)Get a collection of User from Graph API and return as AsyncIterable
requestApi(path, query, headers)Abstract on top of MicrosoftGraphClient.requestRaw()
requestCollection(path, query, queryMode)Get a collection of resource from Graph API and return an AsyncIterable of that resource
requestRaw(url, headers, retryCount)Makes a HTTP call to Graph API with token