diff --git a/capifcorejava/src/main/java/org/oransc/nonrtric/plt/capifcore/controller/ProviderManager.java b/capifcorejava/src/main/java/org/oransc/nonrtric/plt/capifcore/controller/ProviderManager.java
index 0eafaab..eeb501e 100644
--- a/capifcorejava/src/main/java/org/oransc/nonrtric/plt/capifcore/controller/ProviderManager.java
+++ b/capifcorejava/src/main/java/org/oransc/nonrtric/plt/capifcore/controller/ProviderManager.java
@@ -24,6 +24,7 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.CopyOnWriteArrayList;
 
 import org.oransc.capif.model.APIProviderEnrolmentDetails;
 import org.oransc.capif.model.APIProviderEnrolmentDetailsPatch;
@@ -59,6 +60,8 @@
 
     }
 
+
+
     @Override
     public ResponseEntity<APIProviderEnrolmentDetails> registrationsPost(
             APIProviderEnrolmentDetails apIProviderEnrolmentDetails) {
@@ -96,6 +99,42 @@
     }
 
     @Override
+    public ResponseEntity<APIProviderEnrolmentDetails> registrationsRegistrationIdPut(String registrationId,
+            APIProviderEnrolmentDetails registeredProvider) {
+
+
+        if (registeredProvider != onboardedProviders.get(registrationId)) {
+            throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Provider must be onboarded before updating it");
+        }
+
+
+        List<APIProviderFunctionDetails> registeredFuncs;
+
+        APIProviderEnrolmentDetails updatedProvider = onboardedProviders.get(registrationId);
+        updatedProvider.getApiProvDomInfo();
+
+
+        if (updatedProvider == null) {
+            throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Invalid format for provider");
+        }
+        List<APIProviderFunctionDetails> myList = new CopyOnWriteArrayList<APIProviderFunctionDetails>();
+        myList = updatedProvider.getApiProvFuncs();
+        for (APIProviderFunctionDetails function : myList) {
+
+            if (function.getApiProvFuncId() == null) {
+                function.setApiProvFuncId(getFuncId(function.getApiProvFuncRole(), function.getApiProvFuncInfo()));
+                registeredFuncs = registeredProvider.getApiProvFuncs();
+
+                registeredProvider.setApiProvFuncs(registeredFuncs);
+                onboardedProviders.put(registeredProvider.getApiProvDomId(), registeredProvider);
+            }
+
+        }
+
+        return ResponseEntity.ok(registeredProvider);
+    }
+
+    @Override
     public ResponseEntity<APIProviderEnrolmentDetails> modifyIndApiProviderEnrolment(String registrationId,
             APIProviderEnrolmentDetailsPatch apIProviderEnrolmentDetailsPatch) {
 
diff --git a/capifcorejava/src/test/java/org/oransc/nonrtric/plt/capifcore/controller/ProviderManagerTest.java b/capifcorejava/src/test/java/org/oransc/nonrtric/plt/capifcore/controller/ProviderManagerTest.java
index df7180d..3fcbd38 100644
--- a/capifcorejava/src/test/java/org/oransc/nonrtric/plt/capifcore/controller/ProviderManagerTest.java
+++ b/capifcorejava/src/test/java/org/oransc/nonrtric/plt/capifcore/controller/ProviderManagerTest.java
@@ -27,11 +27,15 @@
 import static org.oransc.capif.model.ApiProviderFuncRole.APF;
 
 import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
 
+import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.DisplayName;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.ExtendWith;
 import org.oransc.capif.model.APIProviderEnrolmentDetails;
+import org.oransc.capif.model.APIProviderFunctionDetails;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
 import org.springframework.mock.web.MockHttpServletRequest;
@@ -41,16 +45,24 @@
 
 @ExtendWith(SpringExtension.class)
 class ProviderManagerTest {
+    ProviderManager managerUnderTest;
+    APIProviderEnrolmentDetails apiProviderEnrolmentDetails;
+
+
+    @BeforeEach
+    void init() {
+        MockHttpServletRequest request = new MockHttpServletRequest();
+        RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(request));
+        managerUnderTest = new ProviderManager();
+
+        apiProviderEnrolmentDetails = new APIProviderEnrolmentDetails();
+        apiProviderEnrolmentDetails.apiProvDomInfo("apiProvDomInfo");
+
+    }
 
     @Test
     @DisplayName("Post Registration API Should Get apiProvDomId And Response Should Include Location Header")
     void testResgistrationPostAndResponseLocationHeader() throws Exception {
-        MockHttpServletRequest request = new MockHttpServletRequest();
-        RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(request));
-
-        ProviderManager managerUnderTest = new ProviderManager();
-        APIProviderEnrolmentDetails apiProviderEnrolmentDetails = new APIProviderEnrolmentDetails();
-        apiProviderEnrolmentDetails.apiProvDomInfo("apiProvDomInfo");
 
         ResponseEntity<APIProviderEnrolmentDetails> response =
                 managerUnderTest.registrationsPost(apiProviderEnrolmentDetails);
@@ -64,20 +76,31 @@
     @Test
     @DisplayName("Delete the provider")
     void testRegistrationsRegistrationIdDelete() {
-        MockHttpServletRequest request = new MockHttpServletRequest();
-        RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(request));
 
-        ProviderManager managerUnderTest = new ProviderManager();
-        APIProviderEnrolmentDetails apiProviderEnrolmentDetails = new APIProviderEnrolmentDetails();
-        apiProviderEnrolmentDetails.apiProvDomInfo("apiProvDomInfo");
         managerUnderTest.registrationsPost(apiProviderEnrolmentDetails);
-
-
         ResponseEntity<Void> response = managerUnderTest.registrationsRegistrationIdDelete("domain_id_apiProvDomInfo");
         assertThat(response.getStatusCode()).isEqualTo(HttpStatus.NO_CONTENT);
 
     }
 
+    @Test
+    @DisplayName("Update the provider")
+    void testRegistrationsRegistrationIdPut() {
+
+        managerUnderTest.registrationsPost(apiProviderEnrolmentDetails);
+        List<APIProviderFunctionDetails> registeredFuncs = new ArrayList<>();
+        APIProviderFunctionDetails apiProviderFunctionDetails = new APIProviderFunctionDetails();
+        apiProviderFunctionDetails.setApiProvFuncInfo("apiProvFuncInfo");
+        apiProviderFunctionDetails.setApiProvFuncRole(APF);
+        registeredFuncs.add(apiProviderFunctionDetails);
+        apiProviderEnrolmentDetails.setApiProvFuncs(registeredFuncs);
+        ResponseEntity<APIProviderEnrolmentDetails> response = managerUnderTest
+                .registrationsRegistrationIdPut("domain_id_apiProvDomInfo", apiProviderEnrolmentDetails);
+        assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK);
+
+    }
+
+
 
     @Test
     void testGetFuncId() {
diff --git a/rapp-manager/config/keystore.jks b/rapp-manager/config/keystore.jks
index 122997a..563c67b 100644
--- a/rapp-manager/config/keystore.jks
+++ b/rapp-manager/config/keystore.jks
Binary files differ
diff --git a/rapp-manager/config/truststore.jks b/rapp-manager/config/truststore.jks
index 60d6288..50a0f9e 100644
--- a/rapp-manager/config/truststore.jks
+++ b/rapp-manager/config/truststore.jks
Binary files differ
diff --git a/rapp-manager/pom.xml b/rapp-manager/pom.xml
index 54e90e8..d532900 100644
--- a/rapp-manager/pom.xml
+++ b/rapp-manager/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-parent</artifactId>
-        <version>2.4.2</version>
+        <version>2.6.6</version>
         <relativePath/>
     </parent>
     <groupId>org.o-ran-sc.nonrtric</groupId>
