Skip to content

How do we instantiate AadHttpClient in Spfx 1.5 plus-beta? #1964

Closed
@MortenGuldbaek

Description

@MortenGuldbaek

Category

  • Question
  • Typo
  • Bug
  • Additional article idea

Expected or Desired Behavior

  1. Update all essential packages to 1.5.0-plusbeta.
  2. Instantiate a AadHttpClient with service scope and id supplied for the constructor.
  3. Use AadHttpClient class get method to load data from registered 3rd party web service.

Observed Behavior

Trying to instantiate AadHttpClient in 1.5 plus-beta throws the following error: The value for "serviceScope" cannot be undefined (roughly translated from Danish).

Mind you that this is is working in 1.4.1 (with supplied with AadHttpClient constructor arguments).

Reading the documentation for AadHttpClient references the AadHttpClientFactory class, but this is nowhere to be found in the plus-beta packages.

Steps to Reproduce

  1. Update all essential packages to 1.5.0-plusbeta.
  2. Instantiate a AadHttpClient with no arguments (even though documentation specifies this as not recommended).
  3. Trying to instantiate AadHttpClient in 1.5 plus-beta throws the following error in the console: The value for "serviceScope" cannot be undefined (roughly translated from Danish).

Can you please advice on how we should use AadHttpClient in version 1.5.0-plusbeta, as no tutorials seem to be mentioning a new approach, and I cannot find the package.

Kind regards from Morten

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:spfxCategory: SharePoint Framework (not extensions related)status:fixed-next-dropIssue planned to be fixed in an upcoming release.status:trackedCurrently tracked with Microsoft’s internal issue tracking system. DO NOT ADD/REMOVE (MSFT managed)type:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions