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:
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?