1

Suppose a Sharepoint framework webpart written in React. This app needs to access some backend API hosted in the same tenant. The user makes the login as always and is given access to the frontend React app. This React app needs to make some requests making use of a token. How to obtain the token from the AD without having to login again? Is there a way for the authenticated user make use of the API backend thru a token? How to obtain/renew the token? Do I have to implement this feature myself or is there a simpler way?

I tried to use the this.context.aadTokeProviderFactory.getTokenProvider() and the getToken() method. But it times out and doesn't return a token. My guess is that it's trying to open a login screen to re-authenticate the user (which I do not want).

Also, I can't use the {tenant} and/or {clientId}

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.