Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

368
Views
'The library has not yet been initialized' when I use @microsoft/teams-js in nuxtjs

this happened when I tried to use @microsoft/teams-js for Single Sign-on (SSO) purposes in nuxtjs.

<template>
  <Tutorial />
</template>

<script>
export default {
  name: 'IndexPage',
  async mounted () {
    const microsoftTeams = await import('@microsoft/teams-js')
    // console.log('client => ', microsoftTeams)
    microsoftTeams.authentication.getAuthToken({
      successCallback: (token) => {
        console.log('token', token)
        microsoftTeams.appInitialization.notifySuccess()
      },
      failureCallback: (message) => {
        // console.log('error', message)
        microsoftTeams.appInitialization.notifyFailure({
          reason: microsoftTeams.appInitialization.FailedReason.AuthFailed,
          message
        })
      },
      resources: ['']
    })
  }
}
</script>

enter image description here

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Initialize the library, before calling other methods, as per the documentation:

microsoftTeams.initialize()

This of course only works when running in a Teams app (tab or personal)

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!