-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
area:authCategory: Authentication (Azure AD / etc)Category: Authentication (Azure AD / etc)area:spfxCategory: SharePoint Framework (not extensions related)Category: SharePoint Framework (not extensions related)status:fixedIssue was fixed in current or prior release.Issue was fixed in current or prior release.status:to-be-reviewedIssue needs to be reviewed by Microsoft for additional follow up / review.Issue needs to be reviewed by Microsoft for additional follow up / review.type:bug-confirmedConfirmed bug, not working as designed / expected.Confirmed bug, not working as designed / expected.
Description
Category
- Question
- Typo
- Bug
- Additional article idea
Expected or Desired Behavior
We use aadHttpClientFactory from SP context in order to work with Azure App Service API . And it worked very well.
Observed Behavior
When I call Azure App Service API by using AadHttpClient I get the error in the browser console:
TypeError: Cannot read property 'call' of undefined
at o (listview-host-assembly_default_65e11fefa9767af7e7b350ea75aebfbd.js:19)
at o.t (listview-host-assembly_default_65e11fefa9767af7e7b350ea75aebfbd.js:19)
Steps to Reproduce
- Create a SPFx 1.9.1 (it doesn't work both in version 1.9.1 and in version 1.7.1) extension (both ListView Command Set and Field Customizer) solution
- Use AadHttpClient to access Azure App Service
Sample code we use:
const aadClicent = await this.context.aadHttpClientFactory.getClient(""8dexxx-xxx-xxx-xxx"");
requestHeaders.append('Content-type', 'application/json');
const httpClientOptions: IHttpClientOptions = {
headers: requestHeaders
};
const response = await aadClicent.get("https://xxxxxx.azurewebsites.net/api/xxxxx/checkid/",
AadHttpClient.configurations.v1, httpClientOptions);
const json = await response.json();
if (response.status == 200) {
return json;
}
else {
return null;
}
It should be noted: this.context above is ExtensionContext
This code worked very well until 2019-10-29.
punamaki, s-KaiNet and nmnikolov
Metadata
Metadata
Assignees
Labels
area:authCategory: Authentication (Azure AD / etc)Category: Authentication (Azure AD / etc)area:spfxCategory: SharePoint Framework (not extensions related)Category: SharePoint Framework (not extensions related)status:fixedIssue was fixed in current or prior release.Issue was fixed in current or prior release.status:to-be-reviewedIssue needs to be reviewed by Microsoft for additional follow up / review.Issue needs to be reviewed by Microsoft for additional follow up / review.type:bug-confirmedConfirmed bug, not working as designed / expected.Confirmed bug, not working as designed / expected.