Problem creating M365 certificate for Boxafe app

Post Reply
LuWiSerjeus
First post
Posts: 1
Joined: Fri Jan 06, 2023 11:34 pm

Problem creating M365 certificate for Boxafe app

Post by LuWiSerjeus »

I am setting up the Boxafe app in my QNAP App Center and want to link my Microsoft 365 domain. I'm following the guidelines as described here https://www.qnap.com/en/how-to/tutorial ... -in-boxafe .
In the section "Generating a Microsoft 365 Tenant ID, Client ID, and Certificate", under 6. I downloaded the BoxafeAppGenerator.ps1 and ran it as described. After the need to install some extra software on my pc, I finally managed to run it. I tried to create the certificate using this command: .\BoxafeAppGenerator.ps1 -AzureEnvironmentName AzureGermanyCloud (my tenant resides in Europe).
I am asked to enter a password for the certificate, so far so good, but then it takes quiet some time (> 1 minute) resulting in an error instead of the Microsoft Single Sign-On (SSO) window I shoud expect.

The error message can be seen in the attached file.
I cannot find any relevant info in the help; is there anyone who can help me with this? Thank you!
You do not have the required permissions to view the files attached to this post.
User avatar
dolbyman
Guru
Posts: 35252
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Problem creating M365 certificate for Boxafe app

Post by dolbyman »

Best to open a ticket, doubt many people here use these QNAP apps (and if this is a bug, QNAP needs to fix it anyways)
AndreasK64
New here
Posts: 8
Joined: Wed Jan 06, 2016 10:51 pm

Re: Problem creating M365 certificate for Boxafe app

Post by AndreasK64 »

I had the same issue, but -partly- success using Microsoft 365 Global as domain region (although I am placed in Germany). I got the Tentant ID, Certificate and KeyCredentials, but unfortunatly no Application ID (line is empty). Above I see lots of red remarks in the shell (User was not found). I thought it was because of missing Azure account and I activated the free account. But unfortunately the same mistake message:
Get-AzureADUser : Error occurred while executing GetUser
Code: Authentication_Unauthorized
Message: User was not found.
RequestId: xxxxx
DateTimeStamp: Sun, 26 Mar 2023 11:01:38 GMT
HttpStatusCode: Forbidden
HttpStatusDescription: Forbidden
HttpResponseStatus: Completed
In D:\Download\qnap\Boxafe\BoxafeAppGenerator.ps1:106 Zeichen:13
+ $user = Get-AzureADUser -ObjectId $creds.Account.Id
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-AzureADUser], ApiException
+ FullyQualifiedErrorId : Microsoft.Open.AzureAD16.Client.ApiException,Microsoft.Open.AzureAD16.PowerShell.GetUser
Post Reply

Return to “Microsoft Azure”