sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

SPfx 1.5.1 has no AadHttpClient

Open peterremote1980 opened this issue 8 years ago • 9 comments

import { AadHttpClient, HttpClientResponse } from '@microsoft/sp-http';

[01:31:06] Error - typescript - src/webparts/shk/components/NoticeBoard.tsx(7,10): error TS2305: Module '"/Users/peter/workspace/shk-demo/node_modules/@microsoft/sp-http/dist/index-internal"'has no exported member 'AadHttpClient'.

peterremote1980 avatar Jul 03 '18 17:07 peterremote1980

AadHttpClient is in preview. If you want to use it, you should use SPFx v1.5.1-plusbeta rather than the regular version. Also, keep in mind, that plusbeta is meant for evaluation purposes and is not supported in production.

waldekmastykarz avatar Jul 03 '18 17:07 waldekmastykarz

thank you Sir

peterremote1980 avatar Jul 05 '18 17:07 peterremote1980

Is this still in Preview?

kasgit avatar Oct 09 '18 03:10 kasgit

It's generally available since v1.6

waldekmastykarz avatar Oct 09 '18 17:10 waldekmastykarz

Hi, Thanks. Yes, we have upgraded to v1.6. But the aadclient documentation still says it is in preview.

https://docs.microsoft.com/en-us/javascript/api/sp-http/aadhttpclient?view=sp-typescript-latest

kasgit avatar Oct 09 '18 21:10 kasgit

Good catch. It seems like not all of the documentation has been updated. AadHttpClient is publicly available and supported for using in production. See the official announcement at https://developer.microsoft.com/en-us/sharepoint/blogs/announcing-the-release-of-sharepoint-framework-v1-6/

waldekmastykarz avatar Oct 10 '18 06:10 waldekmastykarz

Thanks Waldek. I had gone through that.

Also, thank you so much for all the awesome work that you guys do for the sp dev community.

kasgit avatar Oct 10 '18 22:10 kasgit

Thank you for the kind words @kannansgit

waldekmastykarz avatar Oct 11 '18 06:10 waldekmastykarz

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

msft-github-bot avatar Jan 27 '20 06:01 msft-github-bot