Hololens keyword manager7/5/2023 ![]() ![]() With the switch toggled to the ‘off’ position you go through a flow that acquires the currently logged in user’s AAD token so you won’t get a prompt to login. It looks like nuget support has been dropped for MRTK v2.4.0 so download the packages and import into your project. Then, add MRTK v2.4.0 to your project using nuget. If this isn’t of interest just skip these sections as I will make my way towards the various frameworks and APIs used.įor the sample I have used Unity 2019.4.0f1. ![]() This just describes some aspects of how I created the demo application. The code and the rest of this post will be concerned with the different ways that access and id tokens can be retrieved, back-end configuration and an illustration of how you might get an AAD token for some of the new Mixed Reality services such as Azure Spatial Anchors and Azure Remote Rendering. I will leave you with a code repository that you can borrow code from to set up the particular scenario that you are interested in. NET libraries as I have covered that in a previous post IL2CPP + HoloLens, so you may want to be on the lookout for those kind of issues. I won’t focus on some of the other topics like IL2CPP stripping code from. I’m already logged into the HoloLens can I not just access the token already on the device? How do I configure my Azure Active Directory to access services and use role-based access control? The acquisition of an OAuth token requires a browser doesn’t it? So, how can I do this in Unity without buying a browser plugin? So, it seems pretty simple so far so why the need for this post? These are the complications that I associate with this: I won’t cover, for instance Client Credentials flow which is used in an app to service scenario not involving a user. The consented scopes are encapsulated within the access token itself. The end user does this by authenticating and consenting to a set of permissions known as scopes. In brief, the scenario I am talking about is when an end user provides permissions for an app to access services that the user has access to on their behalf. I am going to cover the OAuth 2.0 Authorization Code Grant which you can read about here OAuth Grant Types if you want to understand the details of the flow. ![]() This is fine for a demo and a first-try of the services in question but as soon as you turn your thoughts to developing production code falls down immediately and the first task you will be faced with is how to secure access to your services. Often samples for services will skirt the issue by using secrets embedded into a client side application which you can configure with your own set of secrets for your service instances. In my role at Microsoft I have worked through some of these issues for customers and I get asked a lot about how to set up auth correctly to access Graph APIs, your own APIs and Mixed Reality services. There are some complications and potential blockers for those trying to set this up for the first time and, in my experience there is quite a lot of misunderstanding around the topics of auth in general. You can see code and read about those here and here. NET (MSAL) using the OAuth delegated flow and device code flows. I focused on specific topics such as how to retrieve a token to access the Microsoft Graph API using Microsoft Authentication Library for. If this topic is new to you I would suggest reading through the identity platform overview here I have previously written a little about the topic of retrieving Azure Active Directory (AAD) OAuth2 identity and access tokens on a HoloLens device. We’ll see how this can be extended into an app later in the article. You can now add up to 64 other users logging in via AAD and have the device be shared by signing in an out. ![]()
0 Comments
Leave a Reply. |