none
HealthRecordAccessor1.RemoveApplicationAuthorization() - Access denied error

    Question

  • Hi All

    I am able to connect a patient to my application via Connect Patient API and now trying to revert that connection(kind of disconnect that patient from my application). In one the forums I see that I can call RemoveApplicationAuthorization() method to achieve this, but I am getting below access denied error which calling this method. Can some one let me know what exactly I am missing ?

    Thanks
    Vittal

    Microsoft.Health.HealthServiceAccessDeniedException was unhandled by user code
      Message=Access is denied.
      Source=Microsoft.Health
      ErrorCodeId=11
      StackTrace:
           at Microsoft.Health.EasyWebRequest.WaitForCompletion() in e:\bt\64\private\hv\prod\src\sdk\core\EasyWebRequest.cs:line 750
           at Microsoft.Health.EasyWebRequest.Fetch(Uri url) in e:\bt\64\private\hv\prod\src\sdk\core\EasyWebRequest.cs:line 205
           at Microsoft.Health.EasyWebRequest.Fetch(Uri url, IEasyWebResponseHandler customHandler) in e:\bt\64\private\hv\prod\src\sdk\core\EasyWebRequest.cs:line 246
           at Microsoft.Health.HealthServiceRequest.ExecuteInternal() in e:\bt\64\private\hv\prod\src\sdk\core\HealthServiceRequest.cs:line 191
           at Microsoft.Health.HealthServiceRequest.Execute() in e:\bt\64\private\hv\prod\src\sdk\core\HealthServiceRequest.cs:line 162
           at Microsoft.Health.PlatformPrimitives.HealthVaultPlatformRecord.RemoveApplicationAuthorization(ApplicationConnection connection, HealthRecordAccessor accessor) in e:\bt\64\private\hv\prod\src\sdk\core\HealthVaultPlatformRecord.cs:line 107
           at Microsoft.Health.HealthVaultPlatform.RemoveApplicationAuthorization(ApplicationConnection connection, HealthRecordAccessor accessor) in e:\bt\64\private\hv\prod\src\sdk\core\HealthVaultPlatform.cs:line 1445
           at Microsoft.Health.HealthRecordAccessor.RemoveApplicationAuthorization() in e:\bt\64\private\hv\prod\src\sdk\core\HealthRecordAccessor.cs:line 840
           at ViewPatient.Page_Load(Object sender, EventArgs e) in c:\Users\Vittal\Documents\Visual Studio 2010\Projects\spider\website\ViewPatient.aspx.cs:line 55
           at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
           at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
           at System.Web.UI.Control.OnLoad(EventArgs e)
           at System.Web.UI.Control.LoadRecursive()
           at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
      InnerException:


    M.S.Vittal TechMahindra Ltd

    Sunday, June 16, 2013 9:44 AM

All replies

  • Can you share the AppID? Is this in the US or EU instance?
    Thursday, June 20, 2013 7:14 PM
  • Thanks Santhosh, App ID is c5899ea7-fe03-4f3f-80f4-adaccc094915

    It is EU instance. Request your early response.

    Thanks

    Vittal


    M.S.Vittal TechMahindra Ltd

    Saturday, June 22, 2013 11:03 AM
  • Your app permissions look ok. Can you send sample code that reproduces the problem to me at v-sanpil at microsoft.com?
    Monday, June 24, 2013 5:50 PM