Manage Authenticated User’s Profile Via REST API Using Asgardeo React SDK
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.
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:
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.
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.
Manage Authenticated User Sessions Via REST APIs Using Asgardeo React SDK
Hello everyone. In this article let’s discuss how to invoke SCIM and session management APIs using Asgardeo React SDK…
Hope you have got some idea about how to invoke Asgardeo APIs with Asgardeo React SDK. You can find the full source code below.
GitHub - DimuthuKasunWP/Demo-Asgardeo-React-SDK-API-Invocation: This is a React sample application…
This is a React sample application with Asgardeo SDK integration. This demonstrates how to invoke SCIM APIS and Session…