question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

use : acquire_token_by_username_password

See original GitHub issue

Hello, for security reasons, I need to use the user and passsword to generate the token, I have done it with the MSAL library, but I wanted to know if there are plans to implement this in this library?

token = self.app.acquire_token_by_username_password(username=self.username, password=self.password, scopes=['.default'])

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
hitokiricommented, Jul 12, 2022

Hi @janscas , I know you don’t have time, and I thank you for your work with this library, I just came up with that, I made a fix there by creating the token with the other library, and it worked perfectly, with yours, I had doubts if you were planning to aimplement that, that’s why the question, but thanks again for your work.

0reactions
janscascommented, Nov 21, 2022

The method used by this library is by setting that “app”. If there’s another way and what limitations may have I don’t know. I can’t tell right now other means of reading email, modifying excel, calendar stuff, one drive and etc.

anyway if you just need email maybe pop3 or others I don’t know about

Read more comments on GitHub >

github_iconTop Results From Across the Web

PublicClientApplication.AcquireTokenByUsernamePassword ...
Acquires a token from the authority configured in the app, for the confidential client itself (in the name of no user) using the...
Read more >
c# - Getting graph api token using ...
It is possible to use AcquireTokenByUsernamePassword with a federated user. However, it requires that the federated identity service support ...
Read more >
[Documentation] AcquireTokenByUsernamePassword throws ...
This is a fair usage of Username / Password. App scopes are too powerful or not granular enough, and automating certain tasks can...
Read more >
How to Authenticate Through Azure Active Directory to use ...
It's also possible to get the token by calling AcquireTokenByUsernamePassword instead of AcquireTokenInteractive method (this requires an ...
Read more >
Authenticate with UserCredential and Get Microsoft Graph ...
In some cases if some Microsoft Graph access only avaialable using ... try { result = await App.AcquireTokenByUsernamePassword(scopes, username, password) .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found