Platform

 View Only
  • 1.  API call in Frontdoor to extract userlist

    Posted Fri May 03, 2024 03:44 PM

    Hello

    Each week I manually extract a list of users and their roles in Frontdoor.  Is there an API call available in which I can use to extract this information automatically?

    Thanks


    #Platform


  • 2.  RE: API call in Frontdoor to extract userlist

    Posted Mon May 06, 2024 03:16 AM

    Yes, @Wendy Cho. Check this help page (link).

    I have done this in Postman, however our organization disabled our access to it, so I lost the script.

    We wrote another version in Python and I managed to update the Persona field for many users several months ago.

    The script does the following:

    1. Authenticate against the Frontdoor API with our API Key (see here how to create it)
    2. Retrieve the token
    3. Call the Frontdoor API to retrieve the user list. You'll have to provide the token from step #2
    4. Extract the user list from the returned output

    This is not the first time this topic comes up and, like before, I can write a post with more details if required. I think I'll do it just in case it proves useful: I need to refresh my mind on how this whole story works 😎😎😎



    ------------------------------
    Regards, Guillermo
    ------------------------------



  • 3.  RE: API call in Frontdoor to extract userlist

    Posted Mon May 06, 2024 09:53 AM

    Thank you for the reply.  Any details would be appreciated.  (newbie with API calls).  We are exploring this option because the  legacy administration menu is going to be decommission, and our current script to perform the automatic clicks will no longer be functional. 




  • 4.  RE: API call in Frontdoor to extract userlist

    Posted Tue May 07, 2024 03:40 AM
    Edited by Guillermo Cuadrado Tue November 05, 2024 06:38 PM

    I have more details in this blog post (link). I wrote my findings when I was trying the API a couple of years ago.
    It might help you getting started with API calls.

    On second thought, I am not sure it will return the roles. I need to dig a bit deeper, @Wendy Cho.

    (later)

    Looking at the help pages about getting user information (link), I see the following:

    Response:

    {
       "id": "<string>",
       "login": "<string>",
       "active": <true/false>,
       "full": "<string>",
       "email": "<string>",
       "persona": {
    	"enumValue": "APPLICATION_PLATFORM_OWNER"
       },				
       "forcePwdChange": <true/false>, 
       "domain": "<string>", 
       "failedLoginCount": <int>, 
       "createdBy": "<string>",
       "updatedBy": "<string>",
       "accountType": "STANDARD",
       "external": <true/false>,
       "accountStatus": "<string>"
    }

    Unfortunately, it doesn't mention the customRoles or defaultRoles lists (see this other help page (link)).

    P.S.

    I created a Python script that takes those two simple steps:

    1. Access Frontdoor to get an authorization token with a POST method
    2. Do a GET call to the endpoint, in my case: 
      https://frontdoor-eu.apptio.com/api/v2/users/search?domainName=<YOUR_COMPANY>&hideInactive=false&start=0&pageSize=1000&sortBy=login

    Both are described in the help pages above

    I did NOT get the roles, as I feared.

    Maybe @Ken Haniu can help further...



    ------------------------------
    Regards, Guillermo
    ------------------------------



  • 5.  RE: API call in Frontdoor to extract userlist

    Posted Tue May 07, 2024 01:00 PM

    I appreciate the vote of confidence, @Guillermo Cuadrado. However, you are well beyond me in your knowledge of scripting and Frontdoor. Your best bet may be to submit a support ticket to get the official word on what's possible.




  • 6.  RE: API call in Frontdoor to extract userlist

    Posted 20 days ago

    Hello All,

    The response from the endpoint https://frontdoor.apptio.com/api/v2/environments/customer/[customerdomain] includes an object called "visibleRoles" which enumerates the users' assigned roles. Is that what you're looking for?

    Thank you,



    ------------------------------
    Liam Trant
    ------------------------------