ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Sign In To Portal

  • Summary
  • Usage
  • Syntax
  • Code Sample
  • Environments
  • Licensing Information

Summary

Allows you to sign in to portals. If you are publishing to an ArcGIS Online portal you need to be signed in to ArcGIS Online in order to publish. For those organizations that would like to use ArcGIS Online behind the firewall or in their own private cloud, there is a version that you can install and use on your own computer networks. It is called Portal for ArcGIS.

Legacy:

Signing in to ArcGIS Online or Portal for ArcGIS through ArcGIS for Desktop has changed in the ArcGIS for Desktop 10.2 release. You may receive Warning 1561 when executing this tool. If you receive this message you cannot use the Sign In To Portal tool to authenticate, but must sign in to ArcGIS Online or Portal by clicking File > Sign In. See Signing in to ArcGIS Online in ArcGIS for Desktop applications for more information.

Learn more about managing your portal connections

Usage

  • To sign into an ArcGIS Online portal, your esri global account needs to be registered as a member of ArcGIS Online. To create an esri global account and register it, go to arcgis.com/home/signup.html.

  • Use the Sign Out From Portal tool to sign-out from the ArcGIS Online portal.

Syntax

SignInToPortal_server (username, password, portal_url)
ParameterExplanationData Type
username

Portal for ArcGIS username. This parameter is optional for portals with Integrated Windows Authentication.

String
password

Portal for ArcGIS password. This parameter is optional for portals with Integrated Windows Authentication.

Encrypted String
portal_url

The Sign In To Portal tool reads the URL set in Desktop Administrator. Any user entered value is ignored. The default value is URL for the ArcGIS portal currently chosen by the user in Desktop Administrator.

String

Code Sample

Sign in to ArcGIS Online (Python window)

Signs in to ArcGIS Online with a specified user name and password.

import arcpy
arcpy.SignInToPortal_server("username","password", "")
Publish to ArcGIS Online (stand-alone script)

The following script demonstrates a publishing workflow to ArcGIS Online using Sign In To Portal, Stage Service, Upload Service Definition, and Sign Out From Portal.

# Name: SignInToPortal_Example1.py
# Description: Use SignInToPortal to sign-in to Portal for ArcGIS and use a
# service definition draft to create a service definition and then upload and
# publish that service definition.

# Import system modules
import arcpy
from arcpy import env

# Sign-in to ArcGIS Online
arcpy.SignInToPortal_server("username","password", "")

# Set environment settings
env.workspace = "C:/data"

# Set local variables
in_service_definition_draft = "MyMapService.sddraft"
out_service_definition = "MyMapService.sd"

# Execute StageService
arcpy.StageService_server(in_service_definition_draft, out_service_definition)

# Set local variables
in_sd_file = "MyMapService.sd"
in_server = "My Hosted Services"

# Execute UploadServiceDefinition
arcpy.UploadServiceDefinition_server(in_sd_file, in_server)

# Sign out from ArcGIS Online
arcpy.SignOutFromPortal_server()

Environments

This tool does not use any geoprocessing environments

Licensing Information

  • ArcGIS for Desktop Basic: Yes
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related Topics

  • An overview of the Publishing toolset
Feedback on this topic?

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal