고급 앱 허용량 예시 스크립트

  • 릴리스 버전: Australia
  • 업데이트 날짜 2026년 03월 12일
  • 소요 시간: 2분
  • 관리자 역할을 가진 사용자는 예제 JSON 스크립트를 사용하여 스크립팅된 확장점을 구성할 수 있습니다. 관리자는 이러한 스크립팅된 확장점을 사용하여 인스턴스에 로그인할 수 있는 모바일 앱을 제한할 ServiceNow 수 있습니다. 이러한 스크립트는 승인된 모바일 앱에 대한 리디렉션 링크를 지정하는 데도 사용할 수 있습니다.

    예시 스크립트

    다음 예시 스크립트 모바일 에이전트 는 앱 및 Now Mobile 앱.

    다른 모든 앱은 제한됩니다. 이 스크립트는 또한 속성을 blocked_mobile_apps_redirect 사용합니다. 최종 사용자가 승인되지 않은 앱으로 로그인을 시도하면 리디렉션 버튼과 함께 오류 메시지가 나타납니다. 이 버튼은 최종 사용자가 인스턴스에 연결할 수 있는 권한이 있는 모바일 앱에 로그인하도록 리디렉션합니다.ServiceNow

    var CustomPreAuthProperties = Class.create(); 
    CustomPreAuthProperties.prototype = { 
        initialize: function() {}, 
    
        /** 
         * Returns a JSON object keyed by the custom property names. 
         */ 
        getProperties: function(input) { 
            var customProperties = {}; 
            if (input.clientType == "agent") { 
                customProperties['allowed_mobile_apps'] = 'com.servicenow.fulfiller'; 
                if (input.deviceType == 'android') { 
                    customProperties['blocked_mobile_apps_redirect'] =  
    				'https://play.google.com/store/apps/details?id=com.servicenow.fulfiller&hl=en_US&gl=US'; 
                } else { 
                    customProperties['blocked_mobile_apps_redirect'] =  
    				'https://apps.apple.com/us/app/servicenow-agent/id1446951408'; 
                } 
            } else if (input.clientType == 'request') { 
                customProperties['allowed_mobile_apps'] = 'com.servicenow.requestor'; 
                if (input.deviceType == 'android') { 
                    customProperties['blocked_mobile_apps_redirect'] =  
    				'https://play.google.com/store/apps/details?id=com.servicenow.requestor&hl=en_US&gl=US'; 
                } else { 
                    customProperties['blocked_mobile_apps_redirect'] =  
    				'https://apps.apple.com/us/app/now-mobile/id1469616608'; 
                } 
            } 
    
            return customProperties; 
        }, 
    
        type: 'CustomPreAuthProperties' 
    };
    이 샘플 스크립트는 다음 JSON 객체를 사용합니다.
    • input.clientType 은 모바일 앱 유형을 결정합니다.
    • input.deviceType 은 운영 체제 유형을 결정합니다.