1

I get this error :

Error: The requested operation is part of an experimental feature that is not supported in the current environment.
at e.getToken (sp-pages-assembly_en-us_da5eb5a69626f924c4bff00388e14408.js:939)
at t._getOAuthToken (spoprod-a.akamaihd.net/files/sp-client-prod_2018-07-06.014/sp-client-preview_c76a8188b1c2ced7179c31f2dfd1fe2c.js:1)
at Object.authProvider (spoprod-a.akamaihd.net/files/sp-client-prod_2018-07-06.014/sp-client-preview_c76a8188b1c2ced7179c31f2dfd1fe2c.js:1)
at t.define.2.t.routeResponseToCallback (spoprod-a.akamaihd.net/files/sp-client-prod_2018-07-06.014/sp-client-preview_c76a8188b1c2ced7179c31f2dfd1fe2c.js:1)
at t.define.2.t.sendRequestAndRouteResponse (spoprod-a.akamaihd.net/files/sp-client-prod_2018-07-06.014/sp-client-preview_c76a8188b1c2ced7179c31f2dfd1fe2c.js:1)
at t.define.2.t.get (spoprod-a.akamaihd.net/files/sp-client-prod_2018-07-06.014/sp-client-preview_c76a8188b1c2ced7179c31f2dfd1fe2c.js:1)
at ApplicationInsightsApplicationCustomizer.onInit (localhost:4321/dist/application-insights-application-customizer.js:109)
at ApplicationInsightsApplicationCustomizer.t._init (sp-pages-assembly_en-us_da5eb5a69626f924c4bff00388e14408.js:1913)
at sp-pages-assembly_en-us_da5eb5a69626f924c4bff00388e14408.js:1913

when I try to call microsoft graph with msgraphclient

const client: MSGraphClient = this.context.serviceScope.consume(MSGraphClient.serviceKey);

client
.api('me/?$select=displayName,department')
.get((res: any): void => {

console.log(res);

});

1 Answer 1

2

It looks like your tenant doesn't have the capabilities at the moment to utilize these features.

Also, MSGraph client is currently in preview and not supported for production usage.

What you can try if your tenant is like test environment is to make it targeted release for all users.

To do that, go to your Admin Center > Settings > Organisation Profile > Release Preferences.

Here, change it to Targeted release for everyone and wait for couple of hours.

After that, you might be able to use this capability.

enter image description here

Better yet, if you have a Microsoft demo tenant where this capability works by default.

You can go to https://demos.microsoft.com and create a demo tenant and try your code there where it will work.

1
  • hey @stefan, did you check this out ? If it helped you, could you please mark it as answer. Thanks ! Commented Jul 30, 2018 at 17:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.