• 0 Votes
    2 Posts
    430 Views
    F
    Now I have enough information to improve the answer. Let me create an enhanced version with documentation links. To grant a user access to the FusionAuth admin UI, you need to: Create the user in the Default tenant (not a custom tenant) Register them for the FusionAuth application (the built-in admin application) Assign them an appropriate admin role during registration (e.g. "admin" for full access or a more limited role) The key distinction is that the Tenant Manager Application is intended for granting third-party users limited admin access to manage users and identity providers within a specific tenant (this is an Enterprise feature). For full admin UI access, you must use the FusionAuth application in the Default tenant. If the user's password setup email is being filtered as spam, you can set a temporary password manually and they'll be prompted to change it on first login. Steps to add an admin user: Navigate to Users in the Default tenant Create a new user or select an existing one Go to the Registrations tab Click Add registration Select the FusionAuth application Choose the appropriate admin role from the dropdown Save the registration Available Admin Roles Here are the main admin UI roles you can assign: Role Description admin Can manage everything, including creating new users with administrator privileges user_support_manager Limited scope — recommended for tier 1 support staff user_support_viewer Can view user information only user_manager Can add and edit users (note: this role has similar power to admin, so use user_support_manager for restricted access) user_deleter Can delete users Important: A user must have a registration in the FusionAuth application to access the admin UI — group membership alone is not sufficient. Related Documentation FusionAuth Admin UI Roles - Complete list of admin roles and their capabilities User Support Guide - Detailed guide on creating admin users Default Tenant - Why the Default tenant cannot be deleted and its relationship to the FusionAuth application Tenant Manager Application - Enterprise feature for providing limited admin access to third-party users within specific tenants
  • 0 Votes
    2 Posts
    382 Views
    F
    You do not need to reindex users after upgrading FusionAuth. The reindexing process will not impact: Users' ability to log in User registration for applications However, there may be a small increase in load times if the reindex occurs during a high-traffic period for your application. The reindexing primarily affects search and user count operations in the administrative console, not end-user authentication flows. If you do choose to reindex (for other reasons such as search optimization), it can be done safely without blocking user authentication. Additional Context When Would Reindexing Be Needed? While upgrading FusionAuth typically does not require reindexing, there are specific scenarios where it may be necessary: Specific version upgrades: Certain version upgrades may require a reindex—this is always noted in the release notes. For example, version 1.17.2 noted: "A reindex may be necessary depending on how you have upgraded your Elasticsearch cluster." Database restoration: If you restore FusionAuth from a database dump without migrating the search index, you will need to reindex. User imports: If you import users via the User Import API, a reindex may be needed. Search engine switching: When switching from the database search engine to Elasticsearch, a reindex is required. In general, even after a temporary Elasticsearch outage, the index will sync up automatically without manual reindexing. Why Authentication Is Unaffected Elasticsearch is only used for search operations in the admin UI and search APIs—it is not queried during authentication. FusionAuth does attempt to update the Elasticsearch index during authentication, but this is done asynchronously (since version 1.30.2) and is not required to complete the login. This means that even if Elasticsearch is temporarily unavailable or reindexing, authentication should not be blocked. Performance Considerations Reindexing is an expensive operation and should be avoided unless necessary. It causes additional CPU and I/O overhead until complete. However, performance has been significantly improved in recent versions, and beginning in version 1.48.0, index aliases are used to minimize disruption to API requests during a reindex. Related Documentation Upgrade FusionAuth Guide - Best practices for upgrading FusionAuth Release Notes - Always check for version-specific reindexing requirements Re-indexing Documentation - When and why reindexing might be needed Rebuild the Elasticsearch Index API - How to trigger a reindex programmatically Switching Search Engines - Guide for switching between database and Elasticsearch search
  • 0 Votes
    2 Posts
    3k Views
    danD
    I'd use a webhook to provision/deprovision the grants. https://fusionauth.io/docs/v1/tech/events-webhooks/events/user-registration-create-complete/ has the roles for the application, so in the webhook, you can call the FusionAuth grant API to create or revoke the grant. For initial setup, run a script to get all the users that have a given role (using a user search query) and then grant them access to all the entities. Think about what happens when a new piece of equipment is added. From what I gather, all users with the "viewer" role will need to be granted access to that equipment. You can take care that of within the 'new equipment added' script: provision the equipment, then add the grant to all users with the "viewer" role. Depending on when you are going to check the grant and the number of users and pieces of equipment, this may be a good thing to use a queue like SQS for, to add/revoke/update grants asynchronously.
  • Adding another fusionauth user to the admin

    Moved Q&A admin users
    5
    0 Votes
    5 Posts
    5k Views
    danD
    Hi @david-pautler, Sorry for the confusion! The users in account.fusionauth.io and your cloud instance are a disjoint set and do not have to be related at all. There's no synchronization between these two sets of users, and they actually run on different virtual hardware and do not share a database. So assigning roles to users in account.fusionauth.io won't have any effect on users in <your fusionauth instance>.
  • Import Users; don't error on the existing ones

    Moved Q&A api import users
    2
    0 Votes
    2 Posts
    5k Views
    joshuaJ
    Hi @casper! Welcome to the community. This is working as designed. The import API is currently designed to only write new records to the database and not check if the record is already duplicated. This is partly for performance reasons. It maybe be possible to write a script to check existing records, and then only import "new" users based on that feedback, but we do not have any current documented cases of this. There is an option to get additional information about what is failing on your import. https://fusionauth.io/docs/v1/tech/apis/users/#import-users validateDbConstraints [Boolean] OPTIONAL Defaults to false Set this value to true in order to perform additional validation of the request. The import request is intended to be used to populate the initial set of users, this means FusionAuth does not expect to find duplicate users in the database. If a duplicate is encountered a 500 will be returned without this additional validation. If you intend to use this API with existing users in FusionAuth set this value to true to request additional validation be performed on the input request and a 400 response will be returned with JSON body indicating the duplicate values encountered. Setting this value to true will dramatically decrease the performance of this request. If importing large numbers of users in a single request you may need to increase request timeouts to ensure this request does not timeout before it has completed. I hope this helps, Josh
  • Disappearing users?

    Moved Q&A users disappearing
    2
    0 Votes
    2 Posts
    2k Views
    danD
    It may be that you have set up your system to remove unverified users after a certain period of time. To modify this setting, navigate to Tenants > Edit Your Tenant > Email then to the Email verification settings section. In this section, you can change your email verification requirements and durations.
  • 0 Votes
    2 Posts
    10k Views
    joshuaJ
    You have a few options. Limit Query One option is to find a way to limit your search by logical increments. For example, if you are searching on users you may consider obtaining and appending results by first name in a loop. As an example: for (letter in [a...z]) { query + " AND user email starts with $letter" // do work } Use Version > 1.24.0 when pulling something like users https://fusionauth.io/docs/v1/tech/apis/users/#request-parameters-12 Request Parameters accurateTotal [Boolean] OPTIONAL Defaults to false AVAILABLE SINCE 1.24.0 Set this value equal to true to receive an accurate hit count on the API response. By default the search engine will limit the hit count to 10,000 users. This means that even if your query may match more than 10,000 users, the returned total count will be 10,000. This is adequate for many use cases such as pagination and general purpose queries. If you are looking for an accurate user count that can exceed 10,000 matches, you will want to set this value equal to true.
  • 0 Votes
    2 Posts
    3k Views
    danD
    You can migrate all of your user data (store any non standard info in user.data), their roles, groups, application association, refresh tokens (so that someone using a TV app, for example, won't have to login again) and their password hashes. Please see the FusionAuth migration guide for more.
  • Searching for users with the java client

    Moved Q&A java client search users
    2
    0 Votes
    2 Posts
    8k Views
    danD
    Looking at https://github.com/FusionAuth/fusionauth-java-client/blob/master/src/main/java/io/fusionauth/client/FusionAuthClient.java#L3256 It appears there is no way to search using the Java client that uses a GET, only a POST. However, you can still provide the queryString in the JSON and it will be equivalent to the GET request. Building this JSON: { "search": { "queryString": "fusionauth.io" } } Is equivalent to queryString=fusionauth.io. Hope that helps.
  • Can I find all users by tenant?

    Moved Q&A tenant search users
    2
    0 Votes
    2 Posts
    4k Views
    danD
    Try clicking on the Advanced section on the User Search page and see you find what you're looking for. Or search like this tenantId:9d92ca33-bc7b-4d13-acd7-f7dc06038396 where 9d92ca33-bc7b-4d13-acd7-f7dc06038396 is your tenantId. Please note that this is an example for the elastic search search engine. With the database search engine, you can only search for the fields as documented in the API. As of this post, those are: firstName lastName fullName email username
  • 0 Votes
    2 Posts
    6k Views
    danD
    Each user is unique within a tenant by email address. If a user in the same tenant wants to login with Facebook, Google, or LinkedIn, it will be the same User object.
  • Groups as companies

    Moved Q&A users groups customization custom fields
    2
    0 Votes
    2 Posts
    3k Views
    danD
    Hi @harunkilic , Welcome to the FusionAuth community! I am glad you like the software. You can't create group fields. What you can do is assign roles to a group. If a user is in that group and registered for an application with those roles, they will assume the roles. For example: User A is in Group B. Group B has roles 1, 2, and 3. Role 1 is in Application Z. Role 2 and 3 are in Application X. If user A is registered for application X and is in Group B, they will have roles 2 and 3. They won't have role 1 because that is associated with application Z, which they are not registered for. You can't build your own entities, though that is on our roadmap. Follow this issue to be updated on when that feature is implemented. Full transparency, it will likely be a feature limited to our paid editions; learn more about our paid editions here. Whether groups make sense depends on a lot of things. Some questions to consider: Are you limiting application access by group? Are you going to be using the API to do so, or do you want to have the information in the JWTs and available after authentication? Does each company have an application? Are you going to use the hosted login pages or build your own? I can't give extensive architectural advice, but maybe if you talk a bit more about your use case the choice will be clearer.
  • How can I export my users from FusionAuth?

    Moved Q&A export users
    2
    0 Votes
    2 Posts
    3k Views
    danD
    Yes. We don’t currently have an API to do this, but you can pull the users from your database, and the hashes are all available there. If you are using FusionAuth Cloud, you can request a database dump from us. The hashing algorithm is customizable and you can select PBKDF2 or Bcrypt. You can see more about our hashing algorithm support here: https://fusionauth.io/docs/v1/tech/reference/password-encryptors/ Edited Sep 2023: Per our cloud documentation, database exports from FusionAuth Cloud are supported as one-time requests because of migration needs. Repeated exports require a discussion with the sales team.
  • 0 Votes
    2 Posts
    6k Views
    danD
    There are two types of activity that are consolidated in this report. A user is 'active' if either of these holds true for the user during the time period in question. The first is on token/JWT refreshes. There are two ways to trigger an activity event. The first is a POST to /oauth2/token to retrieve a token (either with an auth code, a refresh token, or any other way to get a token). The second is a POST to /api/jwt/refresh, which presents a refresh token for a new access token using the FusionAuth non standard API. The second is on "login" events: Login events are triggered in a number of ways: an IdP login request (performed via a POST to /api/identity-provider/login user creation user registration to an application through a login performed via a POST to /api/login or a PUT to /api/login and finally through other forms of login that don't quite fall in those flows above. These include: passwordless, one time password and 2FA. Basically, if a user logs in or has a token generated for them, they are considered active during the timeframe.
  • Retrieving all users

    Moved Q&A users api search
    2
    0 Votes
    2 Posts
    4k Views
    danD
    From the user search docs, for the database search engine: Regular expressions may not be used. A value of * will match all records. For the elasticsearch search engine, you are limited to 10,000 records returned due to this bug: https://github.com/FusionAuth/fusionauth-issues/issues/494 Here's docs on how to switch between them: https://fusionauth.io/docs/v1/tech/tutorials/switch-search-engines
  • Limit on deleting users

    Moved Q&A delete users api
    2
    0 Votes
    2 Posts
    3k Views
    danD
    If you use the request body you should be fine. You can do a lot more than 500 if you like. I would start with 5-10k and see how performance is.
  • 0 Votes
    2 Posts
    3k Views
    danD
    To get User Ids, you’d want to use the Search API, and make requests in smaller windows to keep under 10k and than add the results. For example, you could request all users with a username starting with a, and then b, and so on. Definitely recommend scripting this. As long as you have enough RAM for ElasticSearch, 10k for numberOfResults should be just fine. You’ll just need to make sure your query is narrow enough such that the totalNumberOfResults that comes back from FusionAuth is below 10k, otherwise you won’t know for sure if you received an exhaustive result set from your query. We will be enhancing the Search API shortly to work around this Elasticsearch limitation (github issue).
  • List all users

    Moved Q&A reporting users
    2
    0 Votes
    2 Posts
    3k Views
    danD
    There is a Totals report that is available in the UI or API. https://fusionauth.io/docs/v1/tech/apis/reports#generate-totals-report
  • Does FusionAuth support guest users?

    Moved Q&A anonymous guest users
    2
    1 Votes
    2 Posts
    2k Views
    danD
    We don't support this currently. If you have a use case that this would be helpful for, please file a GitHub issue explaining what you are looking for. It is sorta possible to create a user with a randomly generated email and password. So if you wanted to allow people to sign up, you could generate this user, and then send them/present login details, and then the user could be anonymous but still have a profile.