Comments (10)
@BugWizard That specific example (get_billing_and_telephony_credits.py) is for the Accounts API, which is separate (sort of) from the Admin API. A different integration type and set of credentials is used for the Accounts API, since that is usually only of use to MSP or customers that manage multiple Duo accounts. If you were just running examples to test with, you probably want to avoid that one if you don't need it; but if you specifically do need to access account information, you'll need to contact Duo Support for Accounts API access if you don't already have it.
See more info on the Accounts API at https://duo.com/docs/accountsapi
Let us know if you have any questions, and thanks for using Duo.
from duo_client_python.
from duo_client_python.
@BugWizard I'm not sure that either API can tell you how many credits an SMS auth will require? Based on my reading of the telephony-related API calls for both APIs:
https://duo.com/docs/adminapi#telephony-credits-used-report
https://duo.com/docs/accountsapi#get-telephony-credits
there's very little telephony information accessible.
In general, though, the Admin API is used for getting information about a single account, and the Accounts API is used for getting that same information about child accounts.
from duo_client_python.
@BugWizard The Admin API Telephony reporting endpoint can tell you how many credits were used for an individual SMS authentication event that already happened: https://duo.com/docs/adminapi#telephony-logs
If you want to know how many credits SMS to a given country will cost view our rate card here: https://duo.com/docs/telephony-credits#rate-card.
from duo_client_python.
I see!
How would one go about if they wanted to GET only the information of all the Users using the SMS as a way to login?(sms_passcode)?
I apologize for all these noob questions..
I have tried to make custom request for '/admin/v2/logs/authentication' and get the sms_passcode unsuccessfully.
from duo_client_python.
@BugWizard I think this method on the Admin class would do it:
get_authentication_log(api_version=2, factors=["sms_passcode"])
As described in https://duo.com/docs/adminapi#authentication-logs
In a real application, you'd probably want to use the mintime and maxtime to ensure you don't fetch the same authentication multiple times.
You might want to check out our log sync application (https://github.com/duosecurity/duo_log_sync) which is designed to extract Duo logs to an external log tool, if you have something like a SIEM available.
Hope this helps.
from duo_client_python.
Hi sorry to bother again.. I tested the "get_authentication_log(api_version=2, factors=["sms_passcode"])" and it works marvelous thank you, how ever I am having trouble trying to fetch the DATA from over 180 days ago, is there any quick fix I can make in my request to get older events? :)
from duo_client_python.
The upper limit is 180 days, as noted in the introduction to the Authentication Logs section of the Admin API documentation:
Returns a paged list of authentication log events ranging from the last 180 days up to as recently as two minutes before the API request.
from duo_client_python.
oohh that's the default then? I see. Tank you! .. I should've spotted it in the docs :)
from duo_client_python.
No worries. Please close this issue if you don't have any further questions.
from duo_client_python.
Related Issues (20)
- Support for Trust Monitor Data HOT 3
- Retrieve Endpoint by ID
- SSL error HOT 20
- Client sends two `Host` headers HOT 4
- Error - {"code": 40101, "message": "Missing request credentials", "stat": "FAIL"} How to resolve it? HOT 4
- auth_logs request uses 'GET' but doesn't check for URI limits
- Increase _MAX_BACKOFF_WAIT_SECS seconds
- Querying Authlog with a maxtime of > now-2 minutes may lead to inconsistent behavior HOT 1
- sig v4 implementation does not work HOT 1
- Add Support Create Integration for SSO type HOT 5
- Update Admin cannot update the status HOT 1
- Deprecated SSL protocol in CertValidatingHTTPSConnection HOT 4
- Interators not working due to not having metadata populated HOT 5
- 403 Forbidden Access on all methods of Admin API HOT 6
- Duo: no library to generate passcodes HOT 4
- get_authentication_log - api:v2 param filter failing HOT 4
- metadata parse error in add_user_phone HOT 4
- Automatic proxy configuration HOT 2
- get_authentication_log clearing out Params HOT 3
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 duo_client_python.