If you know how to fix the issue, make a pull request instead.
@types/xxxx package and had problems.Definitions by: in index.d.ts) so they can respond.office-js doesn't have definition for Office.context.auth.getAccessTokenAsync() and Office.context.auth at all.
This is intentional. That API is in preview and we don't yet have preview APIs in our regular documentation. (We used to make an exception for this API and we had an article for it, but our policy changed in August.) The reference content for it is now at: https://docs.microsoft.com/en-us/office/dev/add-ins/develop/sso-in-office-add-ins#sso-api-reference
@AKlaus : we just ran into the same issue, not really a solution, but we went for "@types/[email protected]" which seems to be the last one with the definition of the auth property.
@Rick-Kirkham: I do understand your policy. However, wouldn't it be an option to provide a beta package for office-js package, that includes these typings? (Would also provide you with an option to maintain it in the meanwhile.)
@mosslive, @AKlaus, @Rick-Kirkham We're working on a beta/preview plan for DefinitelyTyped and our office-js documentation as a whole. I'll be sure to alert the thread when there's something available.
Hi @AKlaus and @mosslive,
I've submitted PR #34086 to address this issue. We'll be using @types/office-js-preview for preview APIs going forward. Right now, aside from the SSO APIs, there are Excel and Word preview APIs there. We're working on transitioning the Outlook add-in preview APIs there as well (they're currently in @types/office-js and @types/office-js-preview).
Thanks! I can't close the issue, but I believe this is resolved, correct?
@AlexJerabek, it's a good solution. Thank you!
Small clarification about Outlook: The preview items are currently in -preview as well but we're working on removing them from @types/office-js.
Good catch @ElizabethSamuel-MSFT. I've updated my comment.
@ryancavanaugh I believe this issue has been resolved. Can you close this item? Thanks.