recolic / microsoft-intune-archlinux

This is a read-only mirror for https://git.recolic.net/root/microsoft-intune-archlinux.git
16 stars 3 forks source link

Error calling IWS for Terms of Use: Unexpected failure: Unauthorized #8

Closed richard-stafflink closed 2 months ago

richard-stafflink commented 2 months ago

When I try to register my Ubuntu Laptop I get this from journalctl:

May 03 10:53:42 sl-lx intune-portal[13008]: get_brands: Fetching default branding and customization information May 03 10:53:43 sl-lx intune-portal[13008]: Failed to load branding/customization information May 03 10:53:43 sl-lx intune-portal[13008]: get_client{capability="IWService" resource=ResourceId("b8066b99-6e67-41be-REDACTED") endpoint="https://fef.msud01.manage.microsoft.com/StatelessIWService/"}: Requesting a token silently resource=ResourceId("b8066b99-6e67-41be-abfa-75db1a2c8809") May 03 10:53:43 sl-lx intune-portal[13008]: Error calling IWS for Terms of Use: Unexpected failure: Unauthorized

What does Error calling IWS for Terms of Use: Unexpected failure: Unauthorized mean, and how do I fix it?

recolic commented 2 months ago

Could you run lsb_release -a and share the output?

richard-stafflink commented 2 months ago

Hey! thanks for the quick response

$ lsb_release -a

No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.4 LTS Release: 22.04 Codename: jammy

richard-stafflink commented 2 months ago

The readme has a solution for: Error calling IWS for Terms of Use: Unexpected failure: Internal Server Error But not: Error calling IWS for Terms of Use: Unexpected failure: Unauthorized

recolic commented 2 months ago

It looks like.. your problem is related to authentication. I never had similar problem before.

Could you clear cache by rm -rf ~/.Microsoft ~/.cache/intune-portal ~/.config/intune and try enroll again? (also make sure you are running latest version of intune-portal)

If it doesn't work, there would be nothing I could help. You will have to forward your question to internal team thread for help.

richard-stafflink commented 2 months ago

Thanks so much for your help @recolic

Got it to register successfully!

  1. I cleared the cache as you instructed
  2. IT Admin guy removed all my entries in "Devices" in "Azure Intra Admin" Web page
  3. I launched the InTune app and registered successfully

I think step 2 did the trick, because I had done steps 1 & 3 many times already.

The Ubuntu laptop had previously been registered, and still had records associated to it in "Devices". It stopped a few weeks/months ago, and I was obviously trying to re-register, but got the error.

Two things could have causes it to stop:

  1. When the Intune Linux app updated, there was some sort of incompatibility with the existing registration data
  2. At some point my O/S upgraded to Ubuntu 22.04.4 LTS - the point release (x.4) may have caused some clash/incompatibility when comparing O/S version?

Note: The 22.04.4 release was available from February 22, 2024

Not sure really!