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

    Hire Salesforce Developer: Internal, External; Onshore vs. Offshore

    Blog in Salesforce

    Although the services provided by experts have multiple layered challenges, the benefits of those services far outweigh the problems. This is what happens with Salesforce…

    Core Business Operations, Customize the Platform, Flexibility, hire dedicated salesforce developer, hire developer
    CRMJetty Apr 11, 2023
    1,730  Views
    Salesforce Support Online

    Why Do You Need an Ongoing Salesforce Support?

    Blog in Salesforce Consultant

    In a large organization, a Salesforce Administrator is a must-have role and often there is more than one person performing this role, depending on the…

    Customer Support Platform, Salesforce Consultant, Salesforce Development, Salesforce Partner, Salesforce Support
    KeyNode Jul 16, 2018
    3,363  Views

    FlexDeploy Loves Salesforce: Deploy Salesforce Apps and Metadata Objects

    Blog in Salesforce integration

    As you likely know by now, FlexDeploy is an Enterprise DevOps platform with fully integrated support for Salesforce apps, metadata customizations, integrations and more. This…

    Flexagon Jan 6, 2022
    2,566  Views

    Popular Salesforce Videos

    Unleash the Power of Compare Tables | Salesforce Video

    Unleash the Power of Compare Tables | Salesforce Video

    Video in Others, Salesforce Products

    In this video, you will learn how to use compare tables to calculate complex calculations quickly, which you can then use to visualize your data.…

    Salesforce Training, salesforce, Salesforce Video, Salesforce Learning, Compare Tables
    Pooja Jun 19, 2020
    1,944  Views
    How to Delete Multiple Contacts at Once | Salesforce Tutorial

    How to Delete Multiple Contacts at Once | Salesforce Tutorial

    Video in Salesforce Training

    Do you need to delete a bunch of records? Don't want to delete records one by one? This video shows you several ways to delete…

    Salesforce Training, Salesforce Tutorial, salesforce, AppExchange, Salesforce Video
    Neha Yadav Feb 5, 2021
    8,650  Views
    What can Salesforce Service Cloud do for your Businesses

    What can Salesforce Service Cloud do for your Businesses

    Video in Salesforce Cloud Platform

    Salesforce Service Cloud allows you to Streamline Workflow, Automate Service Processes, and Surface Key Topics, Articles, and Experts to transform the agent experience. It simplifies…

    Salesforce Training, Salesforce Tutorial, Salesforce Service Cloud, Salesforce Applications, Salesforce Video
    Algoworks Nov 22, 2021
    2,079  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.