Toggle Side Panel

  • Blogs
  • Consultants
    • Salesforce Product Expertise
      • Top Salesforce ConsultantsTop Salesforce Consultants
      • Marketing Cloud ConsultantsMarketing Cloud Consultants
      • Service Cloud ConsultantsService Cloud Consultants
      • Experience Cloud ConsultantsExperience Cloud Consultants
      • Analytics Cloud ConsultantsAnalytics Cloud Consultants
    • Salesforce Industry Expertise
      • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
      • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
      • Health Cloud ConsultantsHealth Cloud Consultants
      • Commerce Cloud ConsultantsCommerce Cloud Consultants
      • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
    • Salesforce Experts by Location
      • USATop Salesforce Consultants in USA
      • IndiaTop Salesforce Consultants in India
      • AustraliaTop Salesforce Consultants in Australia
      • United KingdomTop Salesforce Consultants in UK
      • CanadaTop Salesforce Consultants in Canada
  • Webinars
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Blogs
    • Consultants
      • Salesforce Product Expertise
        • Top Salesforce ConsultantsTop Salesforce Consultants
        • Marketing Cloud ConsultantsMarketing Cloud Consultants
        • Service Cloud ConsultantsService Cloud Consultants
        • Experience Cloud ConsultantsExperience Cloud Consultants
        • Analytics Cloud ConsultantsAnalytics Cloud Consultants
      • Salesforce Industry Expertise
        • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
        • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
        • Health Cloud ConsultantsHealth Cloud Consultants
        • Commerce Cloud ConsultantsCommerce Cloud Consultants
        • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
      • Salesforce Experts by Location
        • USATop Salesforce Consultants in USA
        • IndiaTop Salesforce Consultants in India
        • AustraliaTop Salesforce Consultants in Australia
        • United KingdomTop Salesforce Consultants in UK
        • CanadaTop Salesforce Consultants in Canada
    • Webinars
    • Contact Us
    • Discussions
    Close search

    Activity › Forums › Salesforce® Discussions › How to assign Connected App to any desired profile programatically by using apex or metadataapi in Salesforce?

    Tagged: Apex, Components, Salesforce APIs, Salesforce Apps, Salesforce Connected Apps, Salesforce Metadata, Salesforce.com, Web Services

    • Salesforce® Discussions

      How to assign Connected App to any desired profile programatically by using apex or metadataapi in Salesforce?

      Posted by Prachi on December 9, 2019 at 6:21 PM

      How to assign Connected App to any desired profile programatically either by using apex or metadataapi?

      Deepak replied 6 years, 10 months ago 2 Members · 1 Reply
      • Apex
      • Components
      • Salesforce APIs
      • Salesforce Apps
      • Salesforce Connected Apps
      • Salesforce Metadata
      • Salesforce.com
      • Web Services
    • 1 Reply
    • Deepak

      Member
      December 10, 2019 at 2:00 PM

      You can use the Salesforce Metadata API(http://www.salesforce.com/us/developer/docs/api_meta/) to create a Connected App(https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_connectedapp.htm), it provides the ConnectedApp metadata type for this purpose. You can either use the File Based method(https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_file_based_calls_intro.htm) or the CRUD method(https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_crud_based_calls_intro.htm) (preferable for programmatic creation).

      Represents a Connected App application. A connected app is an application that integrates with salesforce.com using APIs. Connected apps use standard SAML and OAuth protocols to authenticate, provide Single Sign-On, and provide tokens for use with Salesforce APIs. In addition to standard OAuth capabilities, connected apps allow administrators to set various security policies and have explicit control over who may use the applications. It extends the Metadata metadata type and inherits its fullName field.

      ConnectedApp components have the suffix .connectedapp and are stored in the connected apps folder.

      This API is available in any language supporting HTTP callouts using Web Services (Salesforce provides a WSDL to consume in your client app). If you're using a Java, there is a prebuilt client library available here(https://developer.salesforce.com/page/Introduction_to_the_Force.com_Web_Services_Connector). There is also an Apex wrapper(https://github.com/financialforcedev/apex-mdapi) around the API if you're interested in doing this natively.

      Hope this helps.

    Log In to reply.

    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me

    Popular Salesforce Blogs

    Top 10 Salesforce Winter ’21 Features for Sales Cloud that Amplifies your Sales ROI

    Blog in Salesforce Cloud Platform

    Hello Everyone! We are back with our Salesforce Winter ’21 features series. We have already written about the new features and updates that are available as part…

    Automated Meeting, Business Needs, Call Highlights, Community Cloud, Connected Accounts
    LevelShift (formerly DemandBlue) Nov 11, 2020
    2,386  Views

    How to Pass Data From One Component to Another in Salesforce Lightning?

    Blog in Lightning

    We have to build a lot of components for building up a Salesforce Lightning Application. Lightning events are the right way to pass the values…

    Lightning Component, Lightning Component Framework, Salesforce Lightning, Salesforce Lightning App, Salesforce Lightning Component
    Piyush Apr 9, 2016
    83,490  Views
    How to use Leaflet Map in Salesforce?

    How to use Leaflet Map in Salesforce?

    Blog in Salesforce Implementation

    Leaflet Map: Leaflet is the leading open-source JavaScript library for mobile-friendly interactive maps. The leaflet is designed with simplicity, performance, and usability in mind. Let's…

    CDN, Content Delivery Network, Google Maps in Salesforce, Leaflet, Leaflet Map
    Parv Shekhar Singh May 31, 2018
    11,255  Views

    Popular Salesforce Videos

    Being a Sr. Salesforce Consultant | SFDC Consultant Podcast

    Being a Sr. Salesforce Consultant | SFDC Consultant Podcast

    Video in Salesforce Consultant

    What it is like being a Sr. Salesforce Developer at a consulting firm. What a day in Sr. Salesforce Consultant's life looks like. Struggles of…

    Salesforce Developer, Salesforce Consultant, Salesforce Consulting, SFDC, Salesforce Video
    Prafull Aug 4, 2020
    1,880  Views
    Google Home Assistant Integration with Salesforce

    Google Home Assistant Integration with Salesforce

    Video in Salesforce Integration

    Check out the below link for pdf view. https://www.linkedin.com/pulse/google-home-assistant-integration-salesforce-rajkiran-dewara/

    Salesforce Integration, salesforce, Salesforce Users, Google Home Assistant
    Rajkiran Jan 23, 2020
    4,601  Views
    What is Sales Cloud in Salesforce? | How it can Help Any business?

    What is Sales Cloud in Salesforce? | How it can Help Any business?

    Video in Sales, Salesforce Cloud Platform

    In this video, Shrey is not only teaching but also demonstrating the concept of Sales Cloud in Salesforce. 1. What is sales cloud in Salesforce?…

    Salesforce Training, Salesforce Tutorial, Salesforce Administrator, salesforce, Salesforce Video
    Abhishek Sep 1, 2021
    2,032  Views
    Footer Forcetalks logo

    support@forcetalks.com

    • twitterx

    Quick Links

    Advertise with Us

    Salesforce® Articles

    Dreamforce 2023

    Top Salesforce® Bloggers 2023

    Top Salesforce Consultants

    Get Listed

    Company

    Contact Us

    About Us

    Privacy Policy

    Terms & Conditions

    InsightHub

    Salesforce Blogs

    Salesforce Videos

    Salesforce Groups

    Salesforce Jobs

    © 2026 - Forcetalks ● All Rights Reserved

    Salesforce® is a trademark of Salesforce® Inc. No claim is made to the exclusive right to use “Salesforce”. Any services offered within the Forcetalks website/app are not sponsored or endorsed by Salesforce®.

    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.