Toggle Side Panel

  • Home
  • Articles
    • All Articles
    • Blogs
    • Videos
    • Infographics
  • 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
  • Marketplace
  • Advertise With Us
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Home
    • Articles
      • All Articles
      • Blogs
      • Videos
      • Infographics
    • 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
    • Marketplace
    • Advertise With Us
    • 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, 3 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

    application solution

    Popular Salesforce Blogs

    Navigating Complex Implementation Challenges with Salesforce Consulting Partners

    Blog in Salesforce

    The complexity of the Salesforce platform often makes it challenging to implement solutions such as Service Cloud, Marketing Cloud, and Sales Cloud. Considering the steep…

    Business Efficiency, Business Growth, Business Objectives, Business Performance, Business Strategy
    Carol Sep 16, 2024
    517  Views

    Turn Leads into Gold with the secret weapon: Salesforce Lead Scoring

    Blog in Salesforce

    Imagine dramatically boosting your sales efficiency by focusing only on the leads most likely to convert. If only there was a simple way to identify…

    Automated Grading, Automated Lead Scoring, Behavioral Scoring, Custom Scoring Rules, Customer Data Scoring
    Vimera | Andersen Sep 16, 2024
    362  Views

    10 Ways Salesforce Revenue Cloud can Drive the B2B Buying Experience

    Blog in Salesforce Products

    We are living in a changed world. The pandemic has disrupted sales channels and customer demands. The need for technology to accelerate revenue generation, unify processes…

    AppExchange, Automation, B2B, B2B Buying Experience, B2B Revenue Process
    LevelShift (formerly DemandBlue) Sep 17, 2021
    3,857  Views

    Popular Salesforce Videos

    Work Your Opportunities and Manage Your Pipeline (Lightning Experience) | Salesforce

    Work Your Opportunities and Manage Your Pipeline (Lightning Experience) | Salesforce

    Video in Lightning

    In this video, Salesforce Support demonstrates how to work with deals and manage your pipeline in the Salesforce Lightning Experience. With interactive features that help…

    Salesforce Training, Salesforce Tutorial, Salesforce Lightning, Salesforce Lightning Experience, salesforce
    Mayra Oct 27, 2022
    1,488  Views
    ChartJs Implementation In Salesforce

    ChartJs Implementation In Salesforce

    Video in Others, Lightning

    This was my very first lightning web component I had made on my own. Thought of sharing it 🙂 This component basically shows the no.…

    Salesforce Training, Salesforce Lightning, salesforce, Salesforce Video, Salesforce Learning
    Hitesh Garg?️ Oct 19, 2020
    2,137  Views
    What is Record Types in Salesforce?

    What is Record Types in Salesforce?

    Video in Salesforce Admin

    Record Types is where you have multiple page layouts to a specific profile. Watch this video to learn all about it.

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce CRM, Salesforce Video
    CRS Feb 22, 2022
    1,976  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®.

    Try AuditMyCRM - It is a Salesforce CRM Audit tool which comprehensively scans your Salesforce org and gives you the list of errors or warnings you need to take care of.
    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.