Showing posts with label DXP. Show all posts
Showing posts with label DXP. Show all posts

Tuesday, 31 March 2026

How to Set Up Single Sign-On (SSO) in SitecoreAI (XM Cloud)

March 31, 2026 0

 



In this blog, I'll explain how you can set up Single Sign-On (SSO) in Sitecore AI (XM Cloud). SSO simplifies login management, allowing teams to access the Sitecore Cloud Portal and its applications using their existing identity providers. Sitecore Cloud Portal supports identity providers that use either OpenID Connect (OIDC) or Security Assertion Markup Language (SAML) protocol.

We had a requirement to implement SSO using Microsoft Entra ID. Here I'll explain the step-by-step process to implement that.

Prerequisites

Before starting the configuration, please ensure you have the following access:

  • Azure AD Permissions: The ability to register Sitecore Cloud Portal as an application in Azure AD.
  • Sitecore Cloud Portal Administrative Access: You must hold an Organization Admin or Organization Owner role in Sitecore Cloud Portal.
  • Domain Configuration Access: Permission to create a TXT record with your domain host provider.

Set Up Azure Entra ID

  1. Log in to the Azure Portal.



  2. Go to Microsoft Entra ID → Manage → App registrations.



  3. Click on the New Registration button.
  4. Provide the necessary details:
    • Name – A unique name for your application.
    • Supported account types – Choose based on your requirement:
      • Single tenant only – Use this if your application is meant for users within your organization only.
      • Multi Entra ID tenant – Choose this to allow users from other organizations (e.g., partners) to log in using their credentials.
      • Any Entra ID Tenant + Personal Microsoft accounts – Select this to support both organizational users and personal Microsoft accounts.
      • Personal accounts only – Choose this if the application is intended solely for individual users with personal Microsoft accounts.
    • Redirect URI – Under Redirect URI, select Web and enter https://auth.sitecorecloud.io/login/callback in the URL text box. The redirect URI is the endpoint to which the user is sent by the authorization server after completing its interaction, and to which an access token or authorization code is sent upon successful authorization.




  5. Copy the Application (Client) ID from the newly created app page — you will need it when creating the SSO connection in Sitecore XM Cloud.



  6. Go to the Authentication tab → Settings and check the ID tokens checkbox.



Configure SSO in Sitecore Cloud Portal

  1. Log in to Sitecore Cloud Portal.
  2. Navigate to the SSO Settings:
    • Click on Admin from the top menu.
    • Click Single Sign-On (SSO) from the left navigation, then click Add SSO connection.
    • In the drop-down menu, select OpenID Connect.



  3. In the Add SSO connection dialog, fill in the required details:
    • Email Domain: Enter the email domain(s) associated with this SSO connection (e.g., lng-consultancy.com). You can add up to 50 email domains for a single connection. Only team members with email addresses matching the domains specified here will be able to log in via SSO. Make sure the domains you add are valid and owned by your organization.
    • Connection Type: Choose either Front Channel or Back Channel based on your identity provider's documentation.
    • Discovery URL: Enter the discovery document URL for your Azure Entra ID tenant. Use the Tenant ID copied during the Azure setup. For example: https://login.microsoftonline.com/{yourTenantID}/v2.0/.well-known/openid-configuration
    • Scopes: Include openid, profile, and email. Optionally, add scopes for claims like name, given_name, family_name, and nickname.
    • Client ID: Use the Client ID copied during the Azure Entra ID setup.
    • Client Secret: If using Back Channel (Authorization Code flow), enter the client secret generated in Azure Entra ID.
    • Callback URL: This is the redirect URI provided during app registration (https://auth.sitecorecloud.io/login/callback).



  4. Verifying Your Domain : After saving, a TXT record will be generated. Copy the TXT record and add it to your domain's DNS records. Without domain verification, users will not be able to log in using SSO.
    Example: If your organization owns lng-consultancy.com and lngconsultancy.co.in, you can add both domains in the Email Domain field to allow employees with either domain to log in using their Azure AD credentials.



Enabling the SSO Connection

After verifying the domain and optionally testing your SSO connection, you can enable it.

  1. Navigate to the Sitecore Cloud Portal SSO page.
  2. Locate the SSO connection you want to enable and click Enable.
  3. Once enabled, team members with email addresses matching the SSO connection domain can log in using their identity provider.
I hope this helps you set up SSO in the Sitecore Cloud Portal (XM Cloud). Feel free to drop a comment if you have any questions!

References

Monday, 17 November 2025

SitecoreAI Explained Simply: New Features, AI Agents, and What It Means for Marketers

November 17, 2025 0

 


At Sitecore Symposium 2025, Sitecore introduced the next version of its SaaS-based digital experience platform (DXP), called SitecoreAI. This new platform helps marketers plan, create, and improve campaigns faster with the help of AI. It brings AI-powered personalization, smart automation, and AI-assisted content creation across the whole customer journey.

Main Features of SitecoreAI


1. Strategy

This section includes tools for managing brand guidelines, creating briefs, handling campaigns, and later, a full marketing calendar.

2. Channels

This tab gives access to website and channel management, along with insights related to each channel.

3. Design

Here, users can manage normal website work like page setup, updating components, and maintaining forms.

4. Content

This is for managing content across all channels. It also includes media management (similar to DAM, but full Content Hub support is coming). Soon, it will also help handle embargoed or scheduled content releases—something many CMS tools struggle with.

5. Performance

This tab provides dashboards, insights, and reports to understand how your customer journey is performing.

6. Agentic

This is where Sitecore’s AI vision becomes real. Marketers can subscribe to, customize, or even build their own AI agents.


Agentic Studio: The Core of SitecoreAI

Agentic Studio is the main workspace where marketers work together with AI agents to build digital experiences. It comes with 20 pre-built AI agents, which help automate different tasks such as:

Campaign & Strategy Agents : Help create briefs, find the right audience, and optimize budgets.

Content Production Agents : Create brand-safe content, adapt it for different channels, and keep the messaging consistent.

Migration & Management Agents: These agents can help combine many old websites into one system, saving weeks or months of manual work.

Testing & Optimization Agents : Automate A/B testing, monitor results, and help improve performance.

Marketers can also build their own agents using simple no-code tools.

Key Capabilities of SitecoreAI

1. AI-Driven Content Creation

Helps teams create content faster—such as versions, summaries, metadata, translations, and creative assets.

2. Automated Personalization

AI studies user behavior and delivers the right content automatically, reducing manual work.

3. Better Search Results

With Sitecore Search, AI improves search ranking, understands user queries better, gives recommendations, and reduces zero-result pages.

4. Customer Insights & Predictions

With CDP and Personalize, SitecoreAI improves predictive models, journey insights, and user grouping.

5. AI Agents for Automation

These AI agents can help with:

  • Creating personalized experiences

  • Running optimization tests

  • Finding missing content

  • Suggesting new pages or components

  • Automating marketing workflows

Who Can Use SitecoreAI?

SitecoreAI is available now for:

  • New projects building an AI-first marketing setup

  • Existing XM Cloud customers (no major migration needed)

  • Large, multi-brand enterprises

  • Agencies and Sitecore partners

Why It Matters

For Developers

  • Better APIs and automation tools

  • AI-powered components

  • Faster delivery

  • Less manual personalization rules

For Marketers

  • Create content quickly

  • Launch experiences with AI-based suggestions

  • Personalize without deep technical knowledge

  • Act directly on insights instead of doing manual analysis

Conclusion

SitecoreAI is the start of a new chapter for Sitecore’s digital experience ecosystem.
It is still growing, but the goal is clear: to bring a strong AI layer that makes content creation easier, personalization smarter, and customer journeys more connected.


Tuesday, 19 August 2025

Getting Started with Building Custom Apps for Sitecore XM Cloud Marketplace

August 19, 2025 0

 


The Sitecore App Marketplace for XM Cloud Has Officially Launched

The Sitecore App Marketplace for XM Cloud is now live, opening up extensive possibilities for customizing and extending the platform. This blog consolidates the key development and configuration steps to help you build your first custom app.

I began by setting up a basic standalone application in XM Cloud to understand how the process works. With this capability, you can now create custom tools for your organization—or even apps for the broader Sitecore community. In this blog, we’ll walk through the essential steps to build an app in your development environment and then register and install it in XM Cloud.


What is the Sitecore Marketplace?

The Sitecore Marketplace enables customers, partners, and developers to build and use applications that extend Sitecore’s functionality. This means you can integrate your custom modules into Sitecore XM Cloud through various extension points.

These apps can be:

  • Private (available only to your organization), or

  • Public (shared with anyone using XM Cloud, though the public marketplace is not available yet).

Prerequisites

Before you start, ensure you have the following:

  • Access to Sitecore Cloud Portal – Marketplace apps are currently available only to Organization Owners and Admin users.

  • Development Environment – Node.js 16+ and npm 10+.

  • Basic Web Development Skills – TypeScript and React.

Extension Points: Where Your App Will Appear

When configuring your app, you can choose where in the Sitecore UI it should be visible. Available extension points include:

  • Standalone applications in the Portal

  • Full-screen experiences in XM Cloud

  • XM Cloud site dashboard widgets

  • Page Builder panel applications

  • Page Builder custom fields

For more detail- visit Overview of extension points

Step 1: Create Your App in Cloud Portal

  1. Log in to the Cloud Portal using an Admin or Owner account.

  2. Navigate to Developer Studio > Create App.


  3. Enter the details:

    • Descriptive name (max 50 characters).

    • Select Custom as the app type.



       4. Click Create – your app is now registered and ready for configuration.

Step 2: Configure Your App

  • Extension Points: Choose where your app should appear. You can select multiple points and customize the Route URL or Display Name.

  • API Access: Select the APIs your app will use. For XM Cloud integration, enable XM Cloud APIs.


  • Development URL:

    • React apps → http://localhost:5173

    • Next.js apps → http://localhost:3000

  • App Logo: Add a public logo URL (or use a temporary one: https://cdn-1.webcatalog.io/catalog/sitecore/sitecore-icon.png?v=1731337318728).

  • Activate App: Click Activate > Activate.



Step 3: Set Up Your Development Project

Create a Next.js or React app:

Next.js

npx create-next-app@latest my-test-app
cd my-test-app

React

npm create vite@latest my-test-app
cd my-test-app

Install required SDK packages:

npm install @sitecore-marketplace-sdk/client
npm install @sitecore-marketplace-sdk/xmc # if your app uses XM Cloud APIs


Step 4: Create the useMarketplaceClient Hook

Create a custom hook to manage the SDK initialization. In your src folder,
create /utils/hooks/useMarketplaceClient.ts, and paste the below code:

// utils/hooks/useMarketplaceClient.ts
import { ClientSDK } from "@sitecore-marketplace-sdk/client";
import { useEffect, useState, useCallback, useMemo, useRef } from "react";
export interface MarketplaceClientState {
client: ClientSDK | null;
error: Error | null;
isLoading: boolean;
isInitialized: boolean;
}

export interface UseMarketplaceClientOptions {
retryAttempts?: number; // Default: 3
retryDelay?: number; // Default: 1000ms
autoInit?: boolean; // Default: true
}

const DEFAULT_OPTIONS: Required<UseMarketplaceClientOptions> = {
retryAttempts: 3,
retryDelay: 1000,
autoInit: true,
};

let client: ClientSDK | undefined = undefined;

async function getMarketplaceClient() {
if (client) {
return client;
}
const config = {
target: window.parent,
};
client = await ClientSDK.init(config);
return client;
}

export function useMarketplaceClient(options: UseMarketplaceClientOptions = {}) {
const opts = useMemo(() => ({ ...DEFAULT_OPTIONS, ...options }), [options]);

const [state, setState] = useState<MarketplaceClientState>({
client: null,
error: null,
isLoading: false,
isInitialized: false,
});

const isInitializingRef = useRef(false);

const initializeClient = useCallback(async (attempt = 1): Promise<void> => {
let shouldProceed = false;
setState(prev => {
if (prev.isLoading || prev.isInitialized || isInitializingRef.current) {
return prev;
}
shouldProceed = true;
isInitializingRef.current = true;
return { ...prev, isLoading: true, error: null };
});

if (!shouldProceed) return;

try {
const client = await getMarketplaceClient();
setState({
client,
error: null,
isLoading: false,
isInitialized: true,
});
} catch (error) {
if (attempt < opts.retryAttempts) {
await new Promise(resolve => setTimeout(resolve, opts.retryDelay));
return initializeClient(attempt + 1);
}
setState({
client: null,
error: error instanceof Error ? error : new Error('Failed to initialize MarketplaceClient'),
isLoading: false,
isInitialized: false,
});
} finally {
isInitializingRef.current = false;
}
}, [opts.retryAttempts, opts.retryDelay]);

useEffect(() => {
if (opts.autoInit) {
initializeClient();
}
return () => {
isInitializingRef.current = false;
setState({
client: null,
error: null,
isLoading: false,
isInitialized: false,
});
};
}, [opts.autoInit, initializeClient]);

return useMemo(() => ({
...state,
initialize: initializeClient,
}), [state, initializeClient]);

}

This hook handles:

  • SDK initialization

  • Error handling and retry logic

  • Preventing race conditions

Step 5: Use the Hook in Your App

In your main app component (e.g., App.tsx or pages/index.tsx), import and use the hook.

For Next.js (pages/index.tsx):

import { useState, useEffect } from "react";
import type { ApplicationContext } from "@sitecore-marketplace-sdk/client";
import { useMarketplaceClient } from "../utils/hooks/useMarketplaceClient";
 
export default function Home() {
  const { client, error, isInitialized, isLoading } = useMarketplaceClient();
  const [appContext, setAppContext] = useState<ApplicationContext>();
 
  useEffect(() => {
    if (!error && isInitialized && client) {
      client.query("application.context")
        .then((res) => {
          setAppContext(res.data);
        })
        .catch((error) => {
          console.error("Error retrieving application.context:", error);
        });
    }
  }, [client, error, isInitialized]);
 
  if (isLoading) return <div>Loading...</div>;
  if (error) return <div>Error: {error.message}</div>;
 
  return (
    <div className="p-4">
      <h1>Welcome to {appContext?.name || 'My Marketplace App'}</h1>
    </div>
  );
}


Step 6: Start Development

Run your app:

npm run dev

Then:

  1. Open your Sitecore Cloud Portal.

  2. Navigate to Marketplace.


  3. Find your registered app and open it in one of the configured extension points.

  4. Your app will now run inside Sitecore with secure communication.



Development Tips

  • Always test your app within Sitecore, not just on localhost.

  • Use the browser console in the Sitecore extension point for accurate logs.

  • Sitecore-specific functionality only works inside extension points.

Conclusion

The Sitecore XM Cloud Marketplace is a powerful way to extend the platform with custom applications tailored to your organization’s needs. By following the steps above, you can create, configure, and register your first app—from setting up a development environment to embedding it seamlessly in XM Cloud.

As the marketplace continues to evolve, it opens new opportunities for developers to innovate and share apps across the Sitecore community. If you’re building for your team today, you’re also preparing for tomorrow’s broader ecosystem.

References