PnPJS support for Beta Endpoints

I'm trying to get some user properties from the Beta endpoint of Graph. I can currently get basic user Azure AD properties using the following:

//get graph user profile properties
async function getUserProps (){

This works but returns only very basic user properties (using the V1.0 version of Graph) - I need to be able to pull the users Work Address from the Beta endpoint - I've tried using Graph.setEndpoint('beta') however this always results in returning the V1.0 profile details. Is there any way I can access the beta endpoint?

Alternatively, is there a way under the V1.0 endpoint to pull the Contact Details from Azure AD? They include the Work Address of the user.

Kind regards

Hello @abolam,

Please try out setEndpoint method to call the beta endpoint of Microsoft Graph:'beta').get()

Thanks, I thought it would be something like that just didn't know the syntax :smile: Works perfectly!

1 Like