REST API - Query all tokens for a realm

Hi,

We are in the process of implementing PrivacyIDEA, in that process we
needed an automatic provisioning system based on user groups and AD
attributes. We managed to get it all up and running using REST API and
Powershell.

In this script we check if the users have tokens, if not we provision one
to them (TOTP and/or SMS), and we send this information on email or SMS
based on attributes.

One thing that really slows this script down, is the need to do REST
queries for all users to determinate if there is a token there or not.

Is there a way query for all tokens for example in a realm?

Regards

Martin

Hi Martin,

This would be probably.

GET /token

http://privacyidea.readthedocs.io/en/latest/modules/api/token.html#get--token-

If you are missing something in the docs which would have made your
implementation easier you are welcome to contribute.

Kind regards
CorneliusAm Montag, 8. Mai 2017 10:55:30 UTC+2 schrieb Martin gr├ątrud:

Hi,

We are in the process of implementing PrivacyIDEA, in that process we
needed an automatic provisioning system based on user groups and AD
attributes. We managed to get it all up and running using REST API and
Powershell.

In this script we check if the users have tokens, if not we provision one
to them (TOTP and/or SMS), and we send this information on email or SMS
based on attributes.

One thing that really slows this script down, is the need to do REST
queries for all users to determinate if there is a token there or not.

Is there a way query for all tokens for example in a realm?

Regards

Martin