microscopic-answer-24504
01/06/2023, 2:06 PMmagnificent-energy-493
wonderful-lamp-2357
01/09/2023, 9:25 AMory get identity-config {project-id} --format yaml > identity-config.yaml
2. Edit the config.
3. Push updated config to Ory Network
ory update identity-config {project-id} --file identity-config.yaml
Just like it was described in the doc đdamp-car-18231
01/09/2023, 12:12 PMoidc:
config:
base_redirect_uri: <https://ory.igniteprocurement.com/>
providers:
- client_id: <client_id>
client_secret: <client_secret>
id: microsoft
label: Microsoft
mapper_url: <url_goes_here>
microsoft_tenant: common
provider: microsoft
subject_source: me
scope:
- <https://graph.microsoft.com/User.Read>
- profile
- email
- openid
@User thatâs what i tried initially. <https://graph.microsoft.com/User.Read>
was successfully added to scope
but subject_source
was not added.damp-car-18231
01/09/2023, 12:25 PMWarnings were found.
- Configuration key `serve.*` can not be set and will be ignored.
- Configuration key `cookies.path` can not be set and will be ignored.
- Configuration key `cookies.domain` can not be set and will be ignored.
- Configuration key `session.cookie.domain` can not be set and will be ignored.
- Configuration key `session.cookie.name` can not be set and will be ignored.
- Configuration key `session.cookie.path` can not be set and will be ignored.
It is safe to ignore these warnings unless your intention was to set these keys.
Project updated successfully!
After this i fetched the config with ory get identity-config
and subject_source
was not present in the config.wonderful-lamp-2357
01/09/2023, 1:18 PMdamp-car-18231
01/09/2023, 1:18 PMdamp-car-18231
01/09/2023, 2:41 PMshy-beach-55709
03/07/2023, 1:27 PMdamp-car-18231
03/07/2023, 1:35 PMfunc (w *worker) createOryIdentity(ctx context.Context, user adclient.User) (*oryclient.Identity, error) {
identityState := oryclient.IDENTITYSTATE_ACTIVE
createIdentityBody := oryclient.CreateIdentityBody{
Credentials: &oryclient.IdentityWithCredentials{
Oidc: &oryclient.IdentityWithCredentialsOidc{
Config: &oryclient.IdentityWithCredentialsOidcConfig{
Providers: []oryclient.IdentityWithCredentialsOidcConfigProvider{
oryclient.IdentityWithCredentialsOidcConfigProvider{
Provider: "microsoft",
Subject: user.Id,
},
},
},
},
},
SchemaId: w.orySchemaId,
State: &identityState,
Traits: map[string]interface{}{
"email": user.Mail,
"name": map[string]string{
"first": user.GivenName,
"last": user.Surname,
},
},
VerifiableAddresses: []oryclient.VerifiableIdentityAddress{
*oryclient.NewVerifiableIdentityAddress("completed", user.Mail, true, "email"),
},
}
identity, err := w.oryClient.CreateIdentity(ctx, createIdentityBody)
return identity, err
}
damp-car-18231
03/07/2023, 1:36 PMshy-beach-55709
03/07/2023, 1:42 PMoidc:
enabled: true
config:
providers:
- id: microsoft
provider: microsoft
client_id: client_id
client_secret: client_secret
microsoft_tenant: common
issuer_url: <https://login.microsoftonline.com>
mapper_url: file:///etc/config/oidc.microsoft.jsonnet
scope:
- openid
- profile
- email
However, I don't now how to add that file to the directory when the container is run. I wouldn't like to retrieve that file from an urls as the manual indicates, but I've not been able to add it to the directory when instantiating the container.damp-car-18231
03/07/2023, 1:52 PMoidc:
config:
base_redirect_uri: <redirect-uri>
providers:
- client_id: <azure-client-id>
client_secret: <azure-client-secret>
id: microsoft
label: Microsoft
mapper_url: <https://storage.googleapis.com/bac-gcs-production/ca2c1bb3278251cd64913563fcff9412253581c821d078016e55761e965f989530a8777852603e571aa19ec09553af1cfdd28ba58489d94e4e2f9b906d04455f.jsonnet>
microsoft_tenant: common
provider: microsoft
scope:
- <https://graph.microsoft.com/User.Read>
- profile
- email
- openid
subject_source: me
enabled: true
shy-beach-55709
03/07/2023, 1:58 PMshy-beach-55709
03/09/2023, 8:26 PMdamp-car-18231
03/10/2023, 9:01 AMshy-beach-55709
03/10/2023, 12:19 PM