Comments (2)
Showing the token is basically to prove that the authentication worked! In a real app, there's no need to display the token.
With our Graph SDK, you don't need to manage tokens at all. The DeviceCodeCredential
is wired to the Graph client object, and it handles requesting tokens as you make API calls.
When you restart the program, it will re-prompt you. That's because by default, the Azure Identity library uses an in-memory cache for tokens. Depending on which language you're working with, they provide mechanisms for you to allow it to cache to some persistent storage, which would eliminate the repeated prompts.
As for the "now what?" - if you've gotten a token, you should be good to proceed with the next steps of the tutorial.
from microsoft-graph-training.
I've looked into the whole thing a bit more and by now have a slightly better understanding how it works.
But as someone who literally just started with TypeScript and Graph I felt a little lost when I followed the tutorial and did manage to get the token but had to re-do the whole process each time I changed anything in the code.
I also managed to miss that this tutorial is available in more versions than TypeScript, that one's totally on me...
By now I know that the tokens don't even have a long lifetime in the first place and that they can't be reused anyways.
But since the tutorial just moved on without pointing out that it's normal to have re-doing the device code process each update, nor explaining why we're not storing the token in some form to get around that, I felt like I was missing something fundamental which threw me off.
from microsoft-graph-training.
Related Issues (20)
- import in python tutorial: from graph import Graph HOT 1
- confusing HOT 2
- initialize_graph_for_user_auth HOT 2
- Cannot import name 'GraphRequestAdapter' from 'msgraph' HOT 5
- ModuleNotFoundError: No module named 'kiota_authentication_azure' HOT 4
- There is no "Forever" HOT 1
- Update Go tutorial samples to remove prefix HOT 1
- 'MeRequestBuilder' does not contain a definition for 'Request'
- Issue with Microsoft Graph Version 5.0.0. HOT 1
- Tutorial suggests using non-browsable constructor to create credential HOT 1
- ODataError HOT 9
- Update PHP tutorials to use Microsoft Graph SDK 2.x
- Can successfully get token, but cannot get the User Info HOT 2
- AttributeError: 'GraphRequestAdapter' object has no attribute 'get_token' HOT 1
- Test issue HOT 1
- Test issue
- test issue HOT 1
- test issue
- Missing pip install open-telemetry step in python tutorial - Add user authentication
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microsoft-graph-training.