Trying to create child ID's getting error: The base authorization exceeds the allowed maximum. RRS feed

  • Question

  • I'm trying to find out what I'm doing wrong here or perhaps I set something up wrong on my master application.

            Dim offlineConnection As New OfflineWebApplicationConnection(New Guid(ApplicationID), "https://platform.healthvault-ppe.com/platform/wildcat.ashx", Guid.Empty)


            ' Setting up the application we want to create
            Dim appInfo As New ApplicationInfo()
            appInfo.Name = "Cool child application"
            appInfo.AuthorizationReason = "Cool child application needs authorization to improve your health"
            appInfo.Description = "Cool child application can help you change our lifestyle"
            ' get a base64 encoded logo
            appInfo.LargeLogo = New ApplicationBinaryConfiguration(Application.StartupPath & "\myLogo.jpg", "image/gif")
            ' base64 encoded public key for this application

            ' You need to have PrivacyStatement + TermsOfUse or ActionUrl
            'appInfo.PrivacyStatement = New ApplicationBinaryConfiguration(pathToPrivacyStatementTextFile, "text/plain")
            'appInfo.TermsOfUse = New ApplicationBinaryConfiguration(pathToTermsOfUseTextFile, "text/plain")
            appInfo.ActionUrl = New Uri("http://localhost/redirect.aspx")

            ' Create and add the rules individually
            Dim rules As New List(Of AuthorizationSetDefinition) - Is it something here?
            rules.Add(DirectCast(New TypeIdSetDefinition(Height.TypeId), AuthorizationSetDefinition))
            Dim rule1 As New AuthorizationRule(HealthRecordItemPermissions.Read, rules, Nothing)
            ' Here we are setting up the child as an offline application

            ' Add more rules, if needed

            ' Lets make the child app!
            Provisioner.AddApplication(offlineConnection, appInfo)

    Thursday, August 28, 2014 4:26 PM


  • I found my issue.  You need to ensure the rules definitions are set correctly.  I blindly copied this code from another source.  I only wanted to create CCD's in my master application and therefore only had Create CCD checked.  Notice in the child application I have rules.Add(DirectCast(New TypeIdSetDefinition(Height.TypeId), AuthorizationSetDefinition)) for the Height.  The master app didn't specify that I could have access to that thing thus the error.  When I changed my code to rules.Add(DirectCast(New TypeIdSetDefinition(CCD.TypeId), AuthorizationSetDefinition)) it worked fine.  Again you need to be mindful and only use the permissions that your master application have granted to the child.
    Friday, August 29, 2014 6:09 PM