cap-azure-ad-b2c
Authenticating a CAP service against Azure AD B2C — an identity provider outside the SAP platform.
Facts
Where it sits
Who is behind it
In the atlas: maintains 17, contributes to 59, wrote 2@gregorwolfmaintainerVolker BuzekContributes to this
In the atlas: maintains 7, contributes to 53, wrote 2@vobu1 contributor
What it declares
Every artifact
- Type
- Sample
- Origin
- Independently maintained
As a sample
- Form
- A reference application
Connections
Establishing who is calling and making that identity available
Download
README
quoted from gregorwolf/cap-azure-ad-b2c under MIT, readAuthenticate to a CAP service using Azure AD B2C
This example application demonstrates how to authenticate to a SAP Cloud Application Programming Model service using Azure AD B2C. The client UI is based on the example app Single-Page Application built on MSAL.js with Azure AD B2C.
You want to give it a try please store the following content in the file default-env.json the root folder of this project. The B2C tenant used here is the sample tenant provided by Microsoft which is used also for their examples. As this file might include sensitive data it's not included in the git repository.
{
"VCAP_SERVICES": {
"xsuaa": [
{
"name": "cap-azure-ad-b2c-uaa",
"label": "azure-ad",
"tags": ["azure-ad"],
"plan": "space",
"credentials": {
"identityMetadata": "https://fabrikamb2c.b2clogin.com/fabrikamb2c.onmicrosoft.com/B2C_1_SUSI/v2.0/.well-known/openid-configuration/",
"clientID": "e760cab2-b9a1-4c0d-86fb-ff7084abd902",
"policyName": "B2C_1_SUSI",
"isB2C": true,
"validateIssuer": true,
"loggingLevel": "warn",
"loggingNoPII": true,
"passReqToCallback": false
}
}
]
},
"destinations": []
}
The configuration in app/index.html matches this settings.
For the first start you can run:
npm run setup
to install the dependencies, build, deploy and start the app. It them will be reachable at http://localhost:6420/. The next time you want to start simply run:
npm run start:local
Authenticate to a CAP service using Entra ID
Config of default-env.json:
{
"VCAP_SERVICES": {
"xsuaa": [
{
"name": "cap-entra-id-csw",
"label": "azure-ad",
"tags": ["azure-ad"],
"plan": "space",
"credentials": {
"identityMetadata": "https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration",
"clientID": "<your-client-id>",
"clientSecret": "<your-client-secret>",
"audience": "<your-audience>",
"issuer": "https://sts.windows.net/<your-tenant-id>/",
"isB2C": false,
"validateIssuer": true,
"loggingLevel": "warn",
"loggingNoPII": false,
"passReqToCallback": false
}
}
]
},
"destinations": []
}
Config of app/config.js:
// CSWEntraID
const azureADconfig = {
clientId: "<your-client-id>",
authority:
"https://login.microsoftonline.com/<your-tenant-id>",
};
Deploy to Kyma
Download the kubeconfig from your Kyma instance via the menu behind the account Icon in the upper right corner. Save it in ~/.kube/kubeconfig-kyma.yml. Then run:
export KUBECONFIG=~/.kube/kubeconfig-kyma.yml
Please note that the token in the kubeconfig is only valid for 8 hours. So you might have to redo the download whenever you want to run the commands again.
To keep this project separate from your other deployments I would suggest to create a namespace:
kubectl create namespace cap-azure-ad-b2c
Deploy the configuration:
kubectl -n cap-azure-ad-b2c apply -f kyma/deployment.yaml
Update the container:
kubectl -n cap-azure-ad-b2c rollout restart deployment/cap-azure-ad-b2cDetails
Sources
Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.
Compatibility and provenance
Contributors
History in the atlas
- A sample's domain recorded what kind of thing it is, which artifact_type already says, so it sat under Learning while the capability it demonstrates sat elsewhere — filtering a domain for a worked example returned nothing. Domain now follows the single capability the sample demonstrates; a sample with no single subject stays in Learning.
- First seen.
For your agent
- Ref
artifact:gregorwolf-cap-azure-ad-b2c- JSON
- /artifacts/gregorwolf-cap-azure-ad-b2c.json
- MCP
- Connecting an agent