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, 1 month 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

    Which Industries Can Use Salesforce in 2024?

    Blog in Salesforce

    In today’s digital age, businesses across various sectors are constantly seeking innovative ways to enhance customer relationships, optimize operations, and drive growth. Salesforce, a robust…

    Business Growth, Citizen Engagement, Competitive Advantage, Cost Savings, CRM Platform
    Codleo Jul 24, 2024
    425  Views

    Why Salesforce Admins Prefer Salesforce Self-Service Customer Portal Over Experience Cloud for External Users

    Blog in Salesforce

    All Salesforce admins have faced this problem where business stakeholders walk in and say, “We need our customers to log in and see their data.…

    Customer Portal, Self-service Portal
    CRMJetty Jan 20, 2026
    45  Views
    Lightning-tabset & Lightning-tabs

    All You Need to Know About Lightning-tabset and Lightning-tabs in Salesforce

    Blog in Others

    What is a Lightning-tabset? A Lightning-tabset represents a list of tabs. A lightning-tabset displays a tabbed container with multiple content areas, only one of which is…

    Lighting Segment, Lightning, Lightning Aapp, Lightning Applications, Lightning Arrange System
    Sejal Agrawal Feb 2, 2023
    3,882  Views

    Popular Salesforce Videos

    Create Custom App in Salesforce | Salesforce Custom App | Salesforce Tutorial

    Create Custom App in Salesforce | Salesforce Custom App | Salesforce Tutorial

    Video in Salesforce Training, Salesforce Apps

    Watch this amazing video to learn how to create a custom app in Salesforce. Salesforce is a cloud-based platform that has transformed how companies have…

    Salesforce Training, Salesforce Tutorial, salesforce, Learn Salesforce, Salesforce Video
    Pooja Nov 13, 2020
    2,238  Views
    Salesforce User Experience UX Designer Certification

    Salesforce User Experience UX Designer Certification

    Video in Salesforce Certifications

    The Salesforce User Experience (UX) c is designed for individuals who have at least 6 months in UX design and 3–6 months’ experience utilizing UX…

    Salesforce Training, Salesforce Tutorial, Salesforce Certification, salesforce, salesforce platform
    Jogender Jul 1, 2021
    3,527  Views
    The Story of Salesforce. How Marc Benioff Built The Best CRM

    The Story of Salesforce. How Marc Benioff Built The Best CRM

    Video in Salesforce Stories

    This video, How It Happened explains the story of how Salesforce went from a small startup in San Francisco to become the leading CRM provider.…

    Salesforce Training, Salesforce Tutorial, salesforce, CRM, salesforce services
    Mayra Sep 9, 2022
    1,846  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.