Select to view content in your preferred language

Specify login organization in app URL

2433
4
Jump to solution
10-01-2021 04:16 PM
CMV_Erik
Frequent Contributor

We are creating Experience apps and would like to send out direct links to individual apps. This requires an extra step for our SAML users since they have to manually specify the organization before they can click a SAML login button. Is there a way to specify the organization in the URL itself, perhaps as a URL parameter?

I'm using a URL alias inside of AGOL to the URL site as a workaround, but that's not efficient either. 

Thanks!

 

2 Solutions

Accepted Solutions
KevinMWright13
Regular Contributor

Hi Erik,

 

I ran into the same issue as you and solved it (ungracefully) by tearing apart the URL that gets sent once a user is verified.  

What I did was to send users a URL that includes the organization URL within it so that they don't have to fill it out themselves (most don't know it).

 

Here is my example:

https://<insert_your_org_short_name>.maps.arcgis.com/sharing/rest/oauth2/authorize?client_id=arcgisonline&display=default&response_type=token&state=%7B%22portalUrl%22%3A%22https%3A%2F%2F<insert_your_org_short_name>.maps.arcgis.com%22%2C%22useLandingPage%22%3Afalse%7D&expiration=20160&locale=en-us&redirect_uri=https%3A%2F%2Fexperience.arcgis.com%2Fexperience%2F<insert_ExperienceBuilder_ItemID_Here>&force_login=false&hideCancel=true&showSignupOption=false&canHandleCrossOrgSignIn=true&signuptype=esri&redirectToUserOrgUrl=false

The important variables:

  • org_short_name - this is the first part of the URL that you use when logging into your site.
    • Example : chantillyparks.maps.arcgis.com 
    • You can find this also by going to your admin page on AGOL and looking under General/Organization defaults/Short name.
  • ExperienceBuilder_ItemID  this is the unique ItemID assigned to your Experience. 
    • An example is 8bab9deee1aa408487677ce0d2cb5888 and can be found in the URL of the item details page for the experience or just by looking at the URL when the item is loaded.  for example https://experience.arcgis.com/experience/8bab9deee1aa408487677ce0d2cb5888

Important parameters:

  • portalUrl - this is your portals (ArcGIS Online) address and includes the org_short_name.  example is:
    • chantillyparks.maps.arcgis.com
  • force_login - set this to false if you don't want the user to be asked to sign in again if they are already signed in.

I really hope this is helpful.

 

Thanks,

Kevin

 

Kevin Wright
Data Visualization Enthusiast

View solution in original post

KoenVermeer_HE
New Contributor

Url parameters also work for this, since one of the latests updates:

Use:

https://experience.arcgis.com/experience/<AppId>/?org=<yourorgshortname> 

 

More info:

Use URL parameters—ArcGIS Experience Builder | Documentation

View solution in original post

4 Replies
KevinMWright13
Regular Contributor

Hi Erik,

 

I ran into the same issue as you and solved it (ungracefully) by tearing apart the URL that gets sent once a user is verified.  

What I did was to send users a URL that includes the organization URL within it so that they don't have to fill it out themselves (most don't know it).

 

Here is my example:

https://<insert_your_org_short_name>.maps.arcgis.com/sharing/rest/oauth2/authorize?client_id=arcgisonline&display=default&response_type=token&state=%7B%22portalUrl%22%3A%22https%3A%2F%2F<insert_your_org_short_name>.maps.arcgis.com%22%2C%22useLandingPage%22%3Afalse%7D&expiration=20160&locale=en-us&redirect_uri=https%3A%2F%2Fexperience.arcgis.com%2Fexperience%2F<insert_ExperienceBuilder_ItemID_Here>&force_login=false&hideCancel=true&showSignupOption=false&canHandleCrossOrgSignIn=true&signuptype=esri&redirectToUserOrgUrl=false

The important variables:

  • org_short_name - this is the first part of the URL that you use when logging into your site.
    • Example : chantillyparks.maps.arcgis.com 
    • You can find this also by going to your admin page on AGOL and looking under General/Organization defaults/Short name.
  • ExperienceBuilder_ItemID  this is the unique ItemID assigned to your Experience. 
    • An example is 8bab9deee1aa408487677ce0d2cb5888 and can be found in the URL of the item details page for the experience or just by looking at the URL when the item is loaded.  for example https://experience.arcgis.com/experience/8bab9deee1aa408487677ce0d2cb5888

Important parameters:

  • portalUrl - this is your portals (ArcGIS Online) address and includes the org_short_name.  example is:
    • chantillyparks.maps.arcgis.com
  • force_login - set this to false if you don't want the user to be asked to sign in again if they are already signed in.

I really hope this is helpful.

 

Thanks,

Kevin

 

Kevin Wright
Data Visualization Enthusiast
CMV_Erik
Frequent Contributor

Hi Kevin, 

Thank you for your amazingly detailed response; ungraceful or not, this seems to be what I need. I will try it out and update the post with results. 

Erik

 

Update: Worked like a charm - thanks! FYI I dropped the expiration, display and state parameters and it's still working.

KoenVermeer_HE
New Contributor

Url parameters also work for this, since one of the latests updates:

Use:

https://experience.arcgis.com/experience/<AppId>/?org=<yourorgshortname> 

 

More info:

Use URL parameters—ArcGIS Experience Builder | Documentation

CMV_Erik
Frequent Contributor

I forgot about this post, but I have been using this solution successfully too - confirmed as solution

0 Kudos