Issue
I was working on Vendor Collaboration functionality lately. Today, I wanted to automate the user creation process in azure active directory as well. This is achievable with workflow task “Provision Azure AD B2B user” in user request workflow. For this task to work, you have to create and register an API on azure. The API will use Microsoft Graph to complete the task. That may sound tricky and difficult but it is not. Just follow the instructions in the following two pages:
- Export business-to-business (B2B) users to Azure Active Directory
- D365FO – Azure authentication setup for web services (defined creds and interactive login)
After you create the API on Azure, you should configure your B2B invitation settings at System Administration/Setup/B2B Invitation Configuration as explained by Microsoft here: Export business-to-business (B2B) users to Azure Active Directory
When you follow the instructions above and you are ready to enable your “B2B Invitation Configuration” settings as explained in the Export business-to-business (B2B) users to Azure Active Directory Microsoft article, you might face with a surprise. The surprise is an error saying: “B2B configuration validation failed with error: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.” (Dynamics 365 for Finance and Operations Platform Update 29 with v10.0.5)
Fix
That doesn’t say much, does it? Well, it did not to me. I was so unlucky to find something on Google. After a few hours of work, I realized when you refresh the page, the Key value changes to a longer text. And then when you hit “Run configuration test” button, it will succeed. It turned out that all it needed was a refresh.