Problem using some BasemapStyle basemaps in 100.10 with ArcGIS Identity

810
6
03-16-2021 10:38 AM
mahj
by
New Contributor II

Hi,

I have trouble to get some of the basemaps using the new BasemapStyle to work in ArcGIS Runtime 100.10 when authenticating using ArcGIS Identity (OAuth2 credentials). They work when using an API key.

Seems like image basemaps works, while vector tile basemaps does not. Is this a known issue?

I'm using WPF and .NET Core 3.1.

Tags (2)
0 Kudos
6 Replies
MichaelBranscomb
Esri Frequent Contributor

Hi,

There are no known issues with using the new BasemapStyles and OAuth2.

Can you share a repro?

Thanks

0 Kudos
mahj
by
New Contributor II

Thanks for looking into this. Please find attached a repro created in VS2019.

Paste an API Key, click Set and select a basemap, e.g. ArcGISStreets, and it works as expected.

Create an application in ArcGIS Online, paste its Client ID and Client Secret, click Login and login and select basemap ArcGISStreets, it does not work.
But selecting ArcGISImagery works, even though an exception is thrown.

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Hi,

Thanks for the awesome repro app. You're authenticating as an app, can you try setting the TokenAuthenticationType to OAuthClientCredentials when you create the ServerInfo in your LoginButton_Click event?

TokenAuthenticationType = TokenAuthenticationType.OAuthClientCredentials,

https://developers.arcgis.com/net/wpf/api-reference/html/T_Esri_ArcGISRuntime_Security_TokenAuthenti...

 

0 Kudos
mahj
by
New Contributor II

I'm not sure what you mean that I'm logging in as an app...that wasn't my intention anyway. Is it because I include the client secret when creating the OAuthClientInfo? 

I tried your suggestion and I also tried not providing the client secret instead (keeping the TokenAuthenticationType as OAuthAuthorizationCode), the results are still the same.

There must be something else I'm doing wrong.

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

What account type are you signing in as? 

  • ArcGIS Online Public
  • ArcGIS Developer
  • ArcGIS Online Organizational
  • Enterprise

 

0 Kudos
mahj
by
New Contributor II

It's an ArcGIS Online Organizational account, Creator user type in the Publisher role.

0 Kudos