Manage Authenticated User’s Profile Via REST API Using Asgardeo React SDK

Dimuthu Kasun
Identity Beyond Borders
2 min readNov 27, 2021

Hello everyone. In this article let’s discuss how to manage authenticated user profiles via REST API. Asgardeo SCIM2 standard REST API is available for managing authenticated users' profiles.

prerequisites

For this tutorial, we need to have a React application with Asgardeo Integration. You can find how to integrate Asgardeo with the existing react application from my previous article below.

Invoke REST API Endpoints(SCIM2)

In this case, we can use httpRequst API in Asgardeo Auth React SDK for the API invocation. With httpRequest, we don’t need to retrieve tokens separately to invoke the Asgardeo APIs because the httpRequest will send the token in the Authorization header of the request by default.

  • View the authenticated user’s profile: GET /scim2/Me
  • Update the attribute(s) in the authenticated user’s profile:
    PATCH /scim2/Me

As shown above, you can invoke any of the SCIM2 API endpoints with httpRequest in Asgardeo React SDK.

Sample Use case of how to invoke SCIM GET /Me and PATCH /Me endpoints can be found here.

SCIM2 API Invocation With Asgardeo React SDK

If you are interested in how we can invoke session management APIs using Asgardeo React SDK, you can find my article about that topic here.

Hope you have got some idea about how to invoke Asgardeo APIs with Asgardeo React SDK. You can find the full source code below.

Cheers !!

--

--