By: Aman Negi user 01 Nov 2022 at 10:44 a.m. CDT

11 Responses
Aman Negi gravatar
## Expected behaviour I am just done with the integration of Azure AD with GLUU using passport and authentication with Azure is working fine, now i want to map a custom attribute in GLUU with the group ID send by azure. For this i want to debug and see which claim are send by Azure, i have already gone this [link](https://gluu.org/docs/gluu-server/4.3/tutorials/passport-attributes-mapping/#creating-and-debugging-a-mapping) ## Actual behaviour After adding the "console.log(JSON.stringify(profile))" in the mapping.js file I am not able to find the location of the logs where this will printed. [server directory content](https://postimg.cc/RqcT7hx1) The location doesn't exist in the GLUU server, i just installed. Can you pls help me in finding the log location from where i can debug the attribute mapping.

By Michael Schwartz Account Admin 01 Nov 2022 at 10:54 a.m. CDT

Michael Schwartz gravatar
Kiran, can you point Aman to the right docs in Gluu 4? Aman, why are you not using 4.4.1 ?

By Aman Negi user 01 Nov 2022 at 11:03 a.m. CDT

Aman Negi gravatar
The client project i am working on is using the 4.3 version currently. So that's why we are prefering this version. But i also checked the 4.4 version doc, it also point to same log location.

By Aman Negi user 01 Nov 2022 at 10:42 p.m. CDT

Aman Negi gravatar
Hi Team, Any update on this?

By Kiran Mali staff 02 Nov 2022 at 3:04 a.m. CDT

Kiran Mali gravatar
Hello Aman, here is doc https://gluu.org/docs/gluu-server/4.3/authn-guide/passport/#logging You can find log `/opt/gluu/node/passport/logs/passport.log` location. Best regards, kiran mali

By Aman Negi user 02 Nov 2022 at 4:50 a.m. CDT

Aman Negi gravatar
Hi Kiran, I already check this location but debugging output for mapping.js are now available here.

By Kiran Mali staff 02 Nov 2022 at 7:07 a.m. CDT

Kiran Mali gravatar
Hello, could you please share `passport.log` file? Also please set the log level to `debug`. If you have `debug` log then no need to add an extra console log in the mapping file. Gluu-Passport is already printing raw profile in logs.

By Aman Negi user 07 Nov 2022 at 11:13 a.m. CST

Aman Negi gravatar
Hi Kiran, Sorry for the delay, here it the passport logs with **debug** mode on. ``` 2022-11-07T16:59:24.468Z [INFO] Loggers reconfigured 2022-11-07T16:59:24.627Z [INFO] getTokenEndpoint. Found token endpoint at https://server-d.us.corp.sennovate.com/oxauth/restv1/token 2022-11-07T16:59:24.683Z [INFO] getRPT. RPT details were received 2022-11-07T16:59:24.735Z [INFO] getConfiguration. Passport configs received 2022-11-07T16:59:24.737Z [INFO] Configuration data has been parsed 2022-11-07T16:59:24.742Z [INFO] Loggers reconfigured 2022-11-07T16:59:24.744Z [INFO] Reconfiguring providers 2022-11-07T16:59:24.747Z [INFO] Setting up strategy for provider Azure 2022-11-07T16:59:24.748Z [DEBUG] Provider data is { "id": "Azure", "displayName": "Azure", "type": "openid-client", "mapping": "openid-client", "passportStrategyId": "openid-client", "enabled": true, "callbackUrl": "https://server-d.us.corp.sennovate.com/passport/auth/Azure/callback", "requestForEmail": false, "emailLinkingSafe": false, "options": { "scope": [ "openid", "email", "profile" ], "client_secret": "<CLIENT SECRET>", "client_id": "<CLIENT ID>", "issuer": "https://login.microsoftonline.com/<TENANT-ID>/v2.0", "token_endpoint_auth_method": "client_secret_post", "redirect_uris": [ "https://server-d.us.corp.sennovate.com/passport/auth/Azure/callback" ] }, "passportAuthnParams": { "scope": "openid email profile" }, "verifyCallbackArity": 3 } 2022-11-07T16:59:24.748Z [INFO] Loading node strategy module openid-client 2022-11-07T16:59:24.749Z [VERBOSE] Adding to list of known strategies 2022-11-07T16:59:24.755Z [DEBUG] entered recreateHttpServer(serverURI=https://server-d.us.corp.sennovate.com,port=8090 2022-11-07T16:59:24.756Z [DEBUG] httpPort = -1 2022-11-07T16:59:24.765Z [INFO] Server listening on https://server-d.us.corp.sennovate.com:8090 2022-11-07T16:59:25.016Z [DEBUG] openid-client config: {"grant_types":["authorization_code"],"id_token_signed_response_alg":"RS256","authorization_signed_response_alg":"RS256","response_types":["code"],"token_endpoint_auth_method":"client_secret_post","scope":["openid","email","profile"],"client_secret":"<CLIENT SECRET>","client_id":"<CLIENT ID>","redirect_uris":["https://server-d.us.corp.sennovate.com/passport/auth/Azure/callback"]} 2022-11-07T17:00:05.932Z [VERBOSE] Issuing token 2022-11-07T17:00:05.950Z [INFO] 10.2.10.14 - GET /passport/token HTTP/1.1 200 201 - 16.847 ms 2022-11-07T17:00:07.139Z [VERBOSE] Validating token 2022-11-07T17:00:07.143Z [VERBOSE] Authenticating request against Azure 2022-11-07T17:00:07.152Z [INFO] 172.20.20.58 - GET /passport/auth/Azure/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqd3QiOiJjNzJlM2E4Ni02OWQ0LTRmOGQtYjA0NS04ZDYwZmJlZTJiZmYiLCJpYXQiOjE2Njc4NDA0MDUsImV4cCI6MTY2Nzg0MDUyNX0.L7ySX5dsrxHNd343kw9C6JNp-rsMKzAE5ZnNxxvcfsQ HTTP/1.1 302 0 - 16.906 ms 2022-11-07T17:00:09.040Z [VERBOSE] Authenticating request against Azure 2022-11-07T17:00:09.964Z [DEBUG] Raw profile is {"sub":"_yVxmsPjMVTe3eRxL29fZiOl1xRVDgSgVGSflVSJVkk","name":"admin@sennovateinc.onmicrosoft.com Admin","family_name":"Admin","given_name":"admin@sennovateinc.onmicrosoft.com","picture":"https://graph.microsoft.com/v1.0/me/photo/$value","providerKey":"Azure"} 2022-11-07T17:00:09.964Z [INFO] Applying mapping 'openid-client' to profile 2022-11-07T17:00:09.967Z [DEBUG] Resulting profile data is { "uid": "_yVxmsPjMVTe3eRxL29fZiOl1xRVDgSgVGSflVSJVkk", "cn": "admin@sennovateinc.onmicrosoft.com", "displayName": "admin@sennovateinc.onmicrosoft.com Admin", "givenName": "admin@sennovateinc.onmicrosoft.com" } 2022-11-07T17:00:09.968Z [INFO] User _yVxmsPjMVTe3eRxL29fZiOl1xRVDgSgVGSflVSJVkk authenticated with provider Azure 2022-11-07T17:00:09.974Z [DEBUG] Sending user data eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCIsImtpZCI6IjAyMDU1ZDJjLTUyMTUtNGVkYS04NTYwLWE4ZjViN2IyN2M1NF9zaWdfcnM1MTIifQ.eyJpc3MiOi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H0trXjxtTJqwfA&state=HoIktiDkH-HtOgxGsKkXYyP1XwojHnlr6FUJ9CmFgWs&session_state=906ee67d-3a4c-485c-bf81-2c4a7b15ae58 HTTP/1.1 200 1887 - 939.100 ms 2022-11-07T17:00:24.486Z [DEBUG] doRequest. options = { "throwHttpErrors": false, "headers": { "authorization": "Bearer 6b753cdf-3112-4dc9-adf9-8ec25317fad2_EBE0.516F.3137.E0A2.8014.1A53.1E84.2831", "pct": "4110c2c0-a02c-430d-b25f-5d9986abbae9" } } 2022-11-07T17:00:24.542Z [DEBUG] doRequest. response is: { "body": "{\n \"conf\" : {\n \"serverURI\" : \"https://server-d.us.corp.sennovate.com\",\n \"serverWebPort\" : 8090,\n \"postProfileEndpoint\" : \"https://server-d.us.corp.sennovate.com/oxauth/postlogin.htm\",\n \"spTLSCert\" : \"/etc/certs/passport-sp.crt\",\n \"spTLSKey\" : \"/etc/certs/passport-sp.key\",\n \"logging\" : {\n \"level\" : \"debug\",\n \"consoleLogOnly\" : false,\n \"activeMQConf\" : {\n \"enabled\" : false,\n \"host\" : \"\",\n \"username\" : \"\",\n \"password\" : \"\",\n \"port\" : 0\n }\n }\n },\n \"idpInitiated\" : {\n \"openidclient\" : {\n \"authorizationEndpoint\" : \"https://server-d.us.corp.sennovate.com/oxauth/restv1/authorize\",\n \"clientId\" : \"1503.ce24e48e-72e5-4add-b952-925b11a29fcc\",\n \"acrValues\" : \"passport_saml\"\n },\n \"authorizationParams\" : [ ]\n },\n \"providers\" : [ {\n \"id\" : \"Azure\",\n \"displayName\" : \"Azure\",\n \"type\" : \"openid-client\",\n \"mapping\" : \"openid-client\",\n \"passportStrategyId\" : \"openid-client\",\n \"enabled\" : true,\n \"callbackUrl\" : \"https://server-d.us.corp.sennovate.com/passport/auth/Azure/callback\",\n \"requestForEmail\" : false,\n \"emailLinkingSafe\" : false,\n \"options\" : {\n \"scope\" : \"[\\\"openid\\\",\\\"email\\\",\\\"profile\\\"]\",\n \"client_secret\" : \"<CLIENT SECRET>\",\n \"client_id\" : \"<CLIENT ID>\",\n \"issuer\" : \"https://login.microsoftonline.com/v2.0\",\n \"token_endpoint_auth_method\" : \"client_secret_post\"\n }\n } ]\n}", "statusCode": 200, "headers": { "date": "Mon, 07 Nov 2022 17:00:24 GMT", "server": "Apache", "x-xss-protection": "1; mode=block", "x-content-type-options": "nosniff", "strict-transport-security": "max-age=31536000; includeSubDomains", "content-type": "application/json", "content-length": "1530", "connection": "close" } } 2022-11-07T17:00:24.543Z [INFO] getConfiguration. Passport configs received 2022-11-07T17:00:24.543Z [DEBUG] getConfiguration. Passport configs are: { "conf" : { "serverURI" : "https://server-d.us.corp.sennovate.com", "serverWebPort" : 8090, "postProfileEndpoint" : "https://server-d.us.corp.sennovate.com/oxauth/postlogin.htm", "spTLSCert" : "/etc/certs/passport-sp.crt", "spTLSKey" : "/etc/certs/passport-sp.key", "logging" : { "level" : "debug", "consoleLogOnly" : false, "activeMQConf" : { "enabled" : false, "host" : "", "username" : "", "password" : "", "port" : 0 } } }, "idpInitiated" : { "openidclient" : { "authorizationEndpoint" : "https://server-d.us.corp.sennovate.com/oxauth/restv1/authorize", "clientId" : "1503.ce24e48e-72e5-4add-b952-925b11a29fcc", "acrValues" : "passport_saml" }, "authorizationParams" : [ ] }, "providers" : [ { "id" : "Azure", "displayName" : "Azure", "type" : "openid-client", "mapping" : "openid-client", "passportStrategyId" : "openid-client", "enabled" : true, "callbackUrl" : "https://server-d.us.corp.sennovate.com/passport/auth/Azure/callback", "requestForEmail" : false, "emailLinkingSafe" : false, "options" : { "scope" : "[\"openid\",\"email\",\"profile\"]", "client_secret" : "<CLIENT SECRET>", "client_id" : "<CLIENT ID>", "issuer" : "https://login.microsoftonline.com/v2.0", "token_endpoint_auth_method" : "client_secret_post" } } ] } 2022-11-07T17:00:24.544Z [INFO] Response received 2022-11-07T17:00:24.544Z [INFO] Configuration data has been parsed 2022-11-07T17:00:24.546Z [DEBUG] entered recreateHttpServer(serverURI=https://server-d.us.corp.sennovate.com,port=8090 2022-11-07T17:00:24.547Z [DEBUG] httpPort = 8090 2022-11-07T17:01:24.526Z [DEBUG] doRequest. options = { "throwHttpErrors": false, "headers": { "authorization": "Bearer 6b753cdf-3112-4dc9-adf9-8ec25317fad2_EBE0.516F.3137.E0A2.8014.1A53.1E84.2831", "pct": "4110c2c0-a02c-430d-b25f-5d9986abbae9" } } 2022-11-07T17:01:24.584Z [DEBUG] doRequest. response is: { "body": "{\n \"conf\" : {\n \"serverURI\" : \"https://server-d.us.corp.sennovate.com\",\n \"serverWebPort\" : 8090,\n \"postProfileEndpoint\" : \"https://server-d.us.corp.sennovate.com/oxauth/postlogin.htm\",\n \"spTLSCert\" : \"/etc/certs/passport-sp.crt\",\n \"spTLSKey\" : \"/etc/certs/passport-sp.key\",\n \"logging\" : {\n \"level\" : \"debug\",\n \"consoleLogOnly\" : false,\n \"activeMQConf\" : {\n \"enabled\" : false,\n \"host\" : \"\",\n \"username\" : \"\",\n \"password\" : \"\",\n \"port\" : 0\n }\n }\n },\n \"idpInitiated\" : {\n \"openidclient\" : {\n \"authorizationEndpoint\" : \"https://server-d.us.corp.sennovate.com/oxauth/restv1/authorize\",\n \"clientId\" : \"1503.ce24e48e-72e5-4add-b952-925b11a29fcc\",\n \"acrValues\" : \"passport_saml\"\n },\n \"authorizationParams\" : [ ]\n },\n \"providers\" : [ {\n \"id\" : \"Azure\",\n \"displayName\" : \"Azure\",\n \"type\" : \"openid-client\",\n \"mapping\" : \"openid-client\",\n \"passportStrategyId\" : \"openid-client\",\n \"enabled\" : true,\n \"callbackUrl\" : \"https://server-d.us.corp.sennovate.com/passport/auth/Azure/callback\",\n \"requestForEmail\" : false,\n \"emailLinkingSafe\" : false,\n \"options\" : {\n \"scope\" : \"[\\\"openid\\\",\\\"email\\\",\\\"profile\\\"]\",\n \"client_secret\" : \"<CLIENT SECRET>\",\n \"client_id\" : \"<CLIENT ID>\",\n \"issuer\" : \"https://login.microsoftonline.com/v2.0\",\n \"token_endpoint_auth_method\" : \"client_secret_post\"\n }\n } ]\n}", "statusCode": 200, "headers": { "date": "Mon, 07 Nov 2022 17:01:24 GMT", "server": "Apache", "x-xss-protection": "1; mode=block", "x-content-type-options": "nosniff", "strict-transport-security": "max-age=31536000; includeSubDomains", "content-type": "application/json", "content-length": "1530", "connection": "close" } } 2022-11-07T17:01:24.585Z [INFO] getConfiguration. Passport configs received 2022-11-07T17:01:24.585Z [DEBUG] getConfiguration. Passport configs are: { "conf" : { "serverURI" : "https://server-d.us.corp.sennovate.com", "serverWebPort" : 8090, "postProfileEndpoint" : "https://server-d.us.corp.sennovate.com/oxauth/postlogin.htm", "spTLSCert" : "/etc/certs/passport-sp.crt", "spTLSKey" : "/etc/certs/passport-sp.key", "logging" : { "level" : "debug", "consoleLogOnly" : false, "activeMQConf" : { "enabled" : false, "host" : "", "username" : "", "password" : "", "port" : 0 } } }, "idpInitiated" : { "openidclient" : { "authorizationEndpoint" : "https://server-d.us.corp.sennovate.com/oxauth/restv1/authorize", "clientId" : "1503.ce24e48e-72e5-4add-b952-925b11a29fcc", "acrValues" : "passport_saml" }, "authorizationParams" : [ ] }, "providers" : [ { "id" : "Azure", "displayName" : "Azure", "type" : "openid-client", "mapping" : "openid-client", "passportStrategyId" : "openid-client", "enabled" : true, "callbackUrl" : "https://server-d.us.corp.sennovate.com/passport/auth/Azure/callback", "requestForEmail" : false, "emailLinkingSafe" : false, "options" : { "scope" : "[\"openid\",\"email\",\"profile\"]", "client_secret" : "<CLIENT SECRET>", "client_id" : "<CLIENT ID>", "issuer" : "https://login.microsoftonline.com/v2.0", "token_endpoint_auth_method" : "client_secret_post" } } ] } 2022-11-07T17:01:24.586Z [INFO] Response received 2022-11-07T17:01:24.586Z [INFO] Configuration data has been parsed 2022-11-07T17:01:24.590Z [DEBUG] entered recreateHttpServer(serverURI=https://server-d.us.corp.sennovate.com,port=8090 2022-11-07T17:01:24.590Z [DEBUG] httpPort = 8090 2022-11-07T17:02:24.548Z [DEBUG] doRequest. options = { "throwHttpErrors": false, "headers": { "authorization": "Bearer 6b753cdf-3112-4dc9-adf9-8ec25317fad2_EBE0.516F.3137.E0A2.8014.1A53.1E84.2831", "pct": "4110c2c0-a02c-430d-b25f-5d9986abbae9" } } 2022-11-07T17:02:24.607Z [DEBUG] doRequest. response is: { "body": "{\n \"conf\" : {\n \"serverURI\" : \"https://server-d.us.corp.sennovate.com\",\n \"serverWebPort\" : 8090,\n \"postProfileEndpoint\" : \"https://server-d.us.corp.sennovate.com/oxauth/postlogin.htm\",\n \"spTLSCert\" : \"/etc/certs/passport-sp.crt\",\n \"spTLSKey\" : \"/etc/certs/passport-sp.key\",\n \"logging\" : {\n \"level\" : \"debug\",\n \"consoleLogOnly\" : false,\n \"activeMQConf\" : {\n \"enabled\" : false,\n \"host\" : \"\",\n \"username\" : \"\",\n \"password\" : \"\",\n \"port\" : 0\n }\n }\n },\n \"idpInitiated\" : {\n \"openidclient\" : {\n \"authorizationEndpoint\" : \"https://server-d.us.corp.sennovate.com/oxauth/restv1/authorize\",\n \"clientId\" : \"1503.ce24e48e-72e5-4add-b952-925b11a29fcc\",\n \"acrValues\" : \"passport_saml\"\n },\n \"authorizationParams\" : [ ]\n },\n \"providers\" : [ {\n \"id\" : \"Azure\",\n \"displayName\" : \"Azure\",\n \"type\" : \"openid-client\",\n \"mapping\" : \"openid-client\",\n \"passportStrategyId\" : \"openid-client\",\n \"enabled\" : true,\n \"callbackUrl\" : \"https://server-d.us.corp.sennovate.com/passport/auth/Azure/callback\",\n \"requestForEmail\" : false,\n \"emailLinkingSafe\" : false,\n \"options\" : {\n \"scope\" : \"[\\\"openid\\\",\\\"email\\\",\\\"profile\\\"]\",\n \"client_secret\" : \"<CLIENT SECRET>\",\n \"client_id\" : \"<CLIENT ID>\",\n \"issuer\" : \"https://login.microsoftonline.com/v2.0\",\n \"token_endpoint_auth_method\" : \"client_secret_post\"\n }\n } ]\n}", "statusCode": 200, "headers": { "date": "Mon, 07 Nov 2022 17:02:24 GMT", "server": "Apache", "x-xss-protection": "1; mode=block", "x-content-type-options": "nosniff", "strict-transport-security": "max-age=31536000; includeSubDomains", "content-type": "application/json", "content-length": "1530", "connection": "close" } } 2022-11-07T17:02:24.607Z [INFO] getConfiguration. Passport configs received 2022-11-07T17:02:24.608Z [DEBUG] getConfiguration. Passport configs are: { "conf" : { "serverURI" : "https://server-d.us.corp.sennovate.com", "serverWebPort" : 8090, "postProfileEndpoint" : "https://server-d.us.corp.sennovate.com/oxauth/postlogin.htm", "spTLSCert" : "/etc/certs/passport-sp.crt", "spTLSKey" : "/etc/certs/passport-sp.key", "logging" : { "level" : "debug", "consoleLogOnly" : false, "activeMQConf" : { "enabled" : false, "host" : "", "username" : "", "password" : "", "port" : 0 } } }, "idpInitiated" : { "openidclient" : { "authorizationEndpoint" : "https://server-d.us.corp.sennovate.com/oxauth/restv1/authorize", "clientId" : "1503.ce24e48e-72e5-4add-b952-925b11a29fcc", "acrValues" : "passport_saml" }, "authorizationParams" : [ ] }, "providers" : [ { "id" : "Azure", "displayName" : "Azure", "type" : "openid-client", "mapping" : "openid-client", "passportStrategyId" : "openid-client", "enabled" : true, "callbackUrl" : "https://server-d.us.corp.sennovate.com/passport/auth/Azure/callback", "requestForEmail" : false, "emailLinkingSafe" : false, "options" : { "scope" : "[\"openid\",\"email\",\"profile\"]", "client_secret" : "<CLIENT SECRET>", "client_id" : "<CLIENT ID>", "issuer" : "https://login.microsoftonline.com/v2.0", "token_endpoint_auth_method" : "client_secret_post" } } ] } 2022-11-07T17:02:24.608Z [INFO] Response received 2022-11-07T17:02:24.609Z [INFO] Configuration data has been parsed 2022-11-07T17:02:24.610Z [DEBUG] entered recreateHttpServer(serverURI=https://server-d.us.corp.sennovate.com,port=8090 2022-11-07T17:02:24.610Z [DEBUG] httpPort = 8090 ``` And here is also the** openid-client.js** mapping file ``` module.exports = profile => { console.log("DEBUGING START HERE?") console.log(JSON.stringify(profile._json)) return { uid: profile.sub, mail: profile.email, cn: profile.given_name, displayName: profile.name, givenName: profile.given_name, sn: profile.name.family_name } } ```

By Kiran Mali staff 08 Nov 2022 at 6:50 a.m. CST

Kiran Mali gravatar
Hello Aman, No need of this ` console.log(JSON.stringify(profile._json))`. In profile object you are getting this. ``` 2022-11-07T17:00:09.964Z [DEBUG] Raw profile is {"sub":"_yVxmsPjMVTe3eRxL29fZiOl1xRVDgSgVGSflVSJVkk","name":"admin@sennovateinc.onmicrosoft.com Admin","family_name":"Admin","given_name":"admin@sennovateinc.onmicrosoft.com","picture":"https://graph.microsoft.com/v1.0/me/photo/$value","providerKey":"Azure"} ``` Thank you!

By Aman Negi user 08 Nov 2022 at 11:29 a.m. CST

Aman Negi gravatar
Hi Kiran, below are the details that are sent by the Azure inside the ID token generally, i want to check the the complete content of the ID token, so i can map the appropriate token with the attribute. ``` { "aud": "342c11b2-66cd-48c6-ae59-bfb110b8cfa7", "iss": "https://login.microsoftonline.com/674ce307-e877-4a9e-8c5c-67d08ca3ead8/v2.0", "iat": 1667927711, "nbf": 1667927711, "exp": 1667931611, "email": "admin@sennovateinc.onmicrosoft.com", "idp": "https://sts.windows.net/", "name": "admin@sennovateinc.onmicrosoft.com Admin", "oid": "1sehufh878977873ar3517", "preferred_username": "admin@sennovateinc.onmicrosoft.com", "rh": "0.AXwAB-NMZ3fonkqMXGfQjKPq2LIRLDTNZsZIrlm_sRC4z6d8AH0.", "sub": "_yVxmsPjMVTe3eRxL29fZiOl1xRVDgSgVGSflVSJVkk", "tid": "674ce307-e877-4a9e-8c5c-67d08ca3ead8", "uti": "4ZY9iC2NQEm0kEICDXIBAQ", "ver": "2.0" } ``` And also the console.log("DEBUGING START HERE?") is not printed in the logs, why is that?? Without this how can i troubleshoot the mapping related issue. Please help if you have any info regarding it. Thanks

By Kiran Mali staff 09 Nov 2022 at 3:52 a.m. CST

Kiran Mali gravatar
Hi Aman, You need to use `utils/logging`. For example: In `mapping/google.js` ``` const logger = require('../utils/logging') module.exports = profile => { logger.log2('info', `'${JSON.stringify(profile)}' to profile`) return { uid: profile.username || profile.id, mail: profile.email, cn: profile.displayName, displayName: profile.displayName, givenName: profile.name.givenName, sn: profile.name.familyName } } ```

By Aman Negi user 10 Nov 2022 at 2:42 p.m. CST

Aman Negi gravatar
Hi Kiran, Thanks a lot for this info, I am able to print logs now in passport.log file. This help me in troubleshooting the mapping issue regarding the group. Completed the use case for mapping the group to user profile. I am closing the ticket now. Cheers!!!