Get User Photo, Name &Title of an office 365 group using SPfx

I am trying get the user details i.e. UserName, Title and Profile picture of users that belong to a office 365 distribution group.

I tried this code sample, but i get an undefined error i.e. msGraphClientFactory is undefined.

export default class HelloWorldWebPart extends BaseClientSideWebPart<IHelloWorldWebPartProps> {   public render(): void {     // ...      this.context.msGraphClientFactory       .getClient()       .then((client: MSGraphClient): void => {         // use MSGraphClient here       });   }    // ... }` 

Can someone suggest what i might be doing wrong or suggest an alternative to get the groups members and their user profile info like photo, name an title.