Select to view content in your preferred language

Secure Service Layers : "You are not authorized to access this information"

7458
12
Jump to solution
04-10-2015 02:27 PM
PremRadhakrishnan
Regular Contributor

I am trying to add a secure FeatureService layer to my map, eventually I also want to take the data offline for editing as well. I am unable to do this using embedded usercredentials as below. I have double checked and triple checked the credentials and it works in other places just not here.

GeodatabaseFeatureServiceTable {

        id: featureServiceTable

        url: "http://domain.com/service/FeatureServer/0" // replacing with dummy layer

        credentials: userCredentials

    }

    UserCredentials {

        id: userCredentials

        userName: "DOMAIN\USERNAME"

        password: "PASSWORD"

    }

In my Map I have

FeatureLayer {

id:featurelayer

featureTable: featureSErviceTable

// also tried to use credentials: userCredentials here.

}

The error log is

ArcGIS.Runtime.Feature: void __cdecl QmlFeatureTable::onInitializeComplete(const class QString &) EsriRuntimeQt::GeodatabaseFeatureServiceTable(0x1c7913c1e0)

ArcGIS.Runtime.Layer: void __cdecl QmlLayer::onLayerCreateError(const class QString &) QmlFeatureLayer_QML_52 "" "You are not authorized to access this information"

0 Kudos
12 Replies
JeanneTrieu
Deactivated User

Hi Prem,

You just need to change the following:

UserCredentials {

        id: userCredentials

        userName: "DOMAIN\USERNAME"

        password: "PASSWORD"

    }

Connections {

        target: ArcGISRuntime.identityManager

        onUserCredentialsRequired: {

            loadButton.enabled = true;

            dynamicRadioButton.enabled = true;

            credentials.userName = userCredentials.userName;

            credentials.password = userCredentials.password;

            loadButton.enabled = false;

            dynamicRadioButton.enabled = false;

            }

        }

Regards,

Jen Trieu | Product Eng.

0 Kudos
PremRadhakrishnan
Regular Contributor

Jeanne Trieu​ I tried this and got the same result.

Lucas Danzinger​ I emailed you the feature service with a username and password.

Thank you for all the help .

0 Kudos
LucasDanzinger
Esri Frequent Contributor

This was a bug with the identity manager. It will be fixed in the 10.2.6 release of the SDK, which will be out shortly. The workaround is to directly set the user credentials on the service table instead of using the identity manager.

0 Kudos