question

RonnieKapoor-4055 avatar image
0 Votes"
RonnieKapoor-4055 asked Rahul-4397 commented

Enable Keep me signed in (KMSI) in Azure Active Directory B2C is not working in Custom Policy

Enable Keep me signed in (KMSI) in Azure Active Directory B2C is not working in Custom Policy.

Error - The element 'UserJourneyBehaviors' in namespace 'http://schemas.microsoft.com/online/cpim/schemas/2013/06' has invalid child element 'SingleSignOn' in namespace 'http://schemas.microsoft.com/online/cpim/schemas/2013/06'. List of possible elements expected: 'OnError' in namespace 'http://schemas.microsoft.com/online/cpim/schemas/2013/06'.Schema validation error found at line 11 col 8 in policy \"\" of tenant \"": The element 'UserJourneyBehaviors' in namespace 'http://schemas.microsoft.com/online/cpim/schemas/2013/06' has invalid child element 'SingleSignOn' in namespace 'http://schemas.microsoft.com/online/cpim/schemas/2013/06'. List of possible elements expected: 'OnError' in namespace 'http://schemas.microsoft.com/online/cpim/schemas/2013/06'.

I am using custom b2c policies with separate sign in and sign up (Phone as well) policies..

As per the documentation it should work and I have followed all the steps diligently. But here one of your MSFT says it only works for combined flow of sign in and sign up - https://stackoverflow.com/questions/63790169/hi-im-trying-to-use-kmsi-in-a-custom-policy-using-self-asserted-page-content-def

Please help fix this issue and clarify if it is available for use in custom policies or not OR please rectify my approach to use this feature.

azure-ad-b2c
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

amanpreetsingh-msft avatar image
0 Votes"
amanpreetsingh-msft answered RonnieKapoor-4055 commented

Hello @RonnieKapoor-4055 · Thank you for reaching out.

Do you have any other tags under UserJourneyBehaviors tag, like ScriptExecution tag apart from below mentioned tags?

 <UserJourneyBehaviors>
   <SingleSignOn Scope="Tenant" KeepAliveInDays="30" />
   <SessionExpiryType>Absolute</SessionExpiryType>
   <SessionExpiryInSeconds>1200</SessionExpiryInSeconds>
 </UserJourneyBehaviors>

If yes, make sure that tag is added after these three tags as mentioned below:

42657-image.png

I can reproduce the same error if I move the ScriptExecution tag to top underneath the UserJourneyBehaviors tag.

Please let me know if this helps fixing the error or if you need further assistance to fix the error.


Please "Accept the answer" if the information helped you. This will help us and others in the community as well.



image.png (10.5 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@RonnieKapoor-4055
I just wanted to check in and see if you had any other questions or if you were able to resolve this issue?


Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

0 Votes 0 ·

Hi,

I am still getting the issue even if i change the order of tags

"message": "Validation failed: 1 validation error(s) found in policy \"\" of
2020-11-26T12:11:58.2416296Z tenant \"
\".Please use page contract in content definitions when enabling
2020-11-26T12:11:58.2419805Z JavaScript.Please use page contract in content definitions when enabling JavaScript.",


0 Votes 0 ·
amanpreetsingh-msft avatar image
0 Votes"
amanpreetsingh-msft answered Rahul-4397 commented

Hi @RonnieKapoor-4055 · Usage of ScriptExecution tag is not mandatory and I shared that just as an example to explain the order as per which parameters should be used under UserJourneyBehaviors tag. If you are not using JavaScript in your HTML, you can remove the ScriptExecution tag as there are certain prerequisites documented here, which must be done prior to enabling ScriptExecution, that you have not done due to which you are getting the Please use page contract in content definitions when enabling JavaScript. error.

Please adding only below tags in your RP file (SignupOrSignin.xml) as per the snippet below (which is from my working policy):

  <UserJourneyBehaviors>
    <SingleSignOn Scope="Tenant" KeepAliveInDays="30" />
    <SessionExpiryType>Absolute</SessionExpiryType>
    <SessionExpiryInSeconds>1200</SessionExpiryInSeconds>
  </UserJourneyBehaviors>

43091-image.png

Please let me know if you still face any issues. We can schedule a call to troubleshoot the issue further.


image.png (56.7 KiB)
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @amanpreetsingh-msft , I am facing multiple issues while implementing this.

First of all i am not using SignuporSignin.xml conbined, secondly i am using Self Asserted API , Can KMSI be clubbed in with this ??

0 Votes 0 ·

Let me if we can have a call together to further expedite this ?

0 Votes 0 ·

@RonnieKapoor-4055 · Please send your policy files to AzCommunity[at]Microsoft[dot]com. I will go through it and if required, I will send an email to schedule a call.

0 Votes 0 ·

Hi @amanpreetsingh-msft sir , I am facing same issue . I have attached the screen short please have a look and suggest.

206176-image.png


0 Votes 0 ·
image.png (84.1 KiB)